/* ============================================
   FOR-COMPANY COMMON STYLES
   สไตล์ร่วมสำหรับทุกหน้าใน for-company
   ============================================ */

/* Header Section */
.page-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

.page-header-modern .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-header-modern .page-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
}

.gradient-icon {
    background: linear-gradient(135deg, #49e4fa 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Cards */
.card-modern {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-modern .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid #667eea;
    padding: 15px 20px;
}

.card-modern .card-header h5,
.card-modern .card-header h4,
.card-modern .card-header h3 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.card-modern .card-body {
    padding: 20px;
    font-size: 0.9rem;
}

/* Summary Cards */
.summary-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--card-color-1, #667eea), var(--card-color-2, #764ba2));
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.summary-card .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--card-color-1, #667eea), var(--card-color-2, #764ba2));
    color: white;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.summary-card .card-content {
    flex: 1;
}

.summary-card .card-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1;
}

.summary-card .card-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 8px 0 0 0;
    font-weight: 500;
}

/* Modern Table Styles */
.table-modern {
    margin: 0;
    width: 100%;
    font-size: 0.875rem;
}

.table-modern thead {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-bottom: 2px solid #667eea;
}

.table-modern thead th {
    color: #2c3e50 !important;
    font-weight: 700;
    border: none;
    padding: 12px 10px;
    font-size: 0.9rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-modern tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.table-modern tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.005);
}

.table-modern tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Modern Tabs */
.nav-tabs-modern {
    border: none;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.nav-tabs-modern .nav-link {
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
}

.nav-tabs-modern .nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

.nav-tabs-modern .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-tabs-modern .nav-link i {
    font-size: 1rem;
}

/* Buttons */
.btn-primary-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary-modern {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary-modern:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Badges */
.badge-modern {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.badge-modern-sm {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.badge-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
}

.badge-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.badge-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    color: white;
}

/* Alerts */
.alert-modern {
    border: none;
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.alert-modern i {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-info-modern {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-info-modern i {
    color: #17a2b8;
}

.alert-success-modern {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-success-modern i {
    color: #28a745;
}

.alert-warning-modern {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
}

.alert-warning-modern i {
    color: #ffc107;
}

.alert-danger-modern {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-danger-modern i {
    color: #dc3545;
}

/* Forms */
.form-label-modern {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-control-modern {
    font-size: 0.9rem;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select-modern {
    font-size: 0.9rem;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-select-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state .empty-icon {
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h5 {
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.empty-state p {
    color: #adb5bd;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Pagination */
.pagination-modern .page-link {
    font-size: 0.875rem;
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    color: #667eea;
    font-weight: 600;
}

.pagination-modern .page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-modern .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* Status Badges */
.status-waiting {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
}

.status-active {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.status-inactive {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    color: white;
}

.status-rejected {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.status-draft {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #383d41;
}

/* General Text Sizes */
body {
    font-size: 0.9rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p, label, span, div {
    font-size: 0.9rem;
}

small, .small {
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-modern .page-title {
        font-size: 1.3rem;
    }

    .page-header-modern .page-subtitle {
        font-size: 0.85rem;
    }

    .summary-card {
        padding: 15px;
    }

    .summary-card .card-number {
        font-size: 1.5rem;
    }

    .summary-card .card-label {
        font-size: 0.75rem;
    }

    .table-modern {
        font-size: 0.75rem;
    }

    .table-modern thead th {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .table-modern tbody td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .nav-tabs-modern {
        flex-direction: column;
    }

    .nav-tabs-modern .nav-link {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
    }

    .btn-primary-modern,
    .btn-secondary-modern {
        font-size: 0.85rem;
        padding: 8px 20px;
    }

    .card-modern .card-header h5,
    .card-modern .card-header h4,
    .card-modern .card-header h3 {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease;
}
