/* ============================================
   CSS GLOBAL - ClinicaSysExpert
   ============================================ */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0b7e9e;
    --primary-dark: #065a73;
    --primary-light: #e1f0f5;
    --secondary: #1a2332;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --gray: #95a5a6;
    --gray-light: #f0f2f5;
    --gray-dark: #34495e;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 14px;
    --transition: 0.3s ease;
    --sidebar-width: 250px;
    --header-height: 70px;
    --font: 'Inter', -apple-system, system-ui, sans-serif;
}

body {
    font-family: var(--font);
    background: #f4f7fb;
    color: var(--secondary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d0d7e2;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b0b9c7;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid #eef2f7;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 24px 0 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform var(--transition);
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 28px 24px;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 20px;
}

.sidebar-brand .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.sidebar-brand span {
    font-weight: 800;
    font-size: 20px;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.sidebar-brand span .highlight {
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    padding: 0 14px;
    flex: 1;
}

.sidebar-menu .menu-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.8px;
    padding: 12px 16px 8px;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
}

.sidebar-menu a i {
    width: 20px;
    font-size: 16px;
    color: #9aa6b5;
    transition: color var(--transition);
}

.sidebar-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-menu a:hover i {
    color: var(--primary);
}

.sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-menu a.active i {
    color: var(--primary);
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.sidebar-menu .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.sidebar-menu .badge.blue {
    background: var(--primary);
}

.sidebar-footer {
    padding: 16px 24px 0;
    border-top: 1px solid #eef2f7;
    font-size: 12px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-footer i {
    color: var(--success);
}

/* ===== MAIN ===== */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f4f7fb;
}

/* ===== HEADER ===== */
.header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid #eef2f7;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background var(--transition);
}

.menu-toggle:hover {
    background: var(--gray-light);
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--gray-light);
    border-radius: 30px;
    padding: 2px 18px 2px 16px;
    gap: 10px;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.header-search:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 126, 158, 0.08);
}

.header-search input {
    border: none;
    background: transparent;
    padding: 10px 0;
    outline: none;
    font-size: 14px;
    width: 220px;
    font-family: var(--font);
    color: var(--secondary);
}

.header-search input::placeholder {
    color: #b0b8c5;
}

.header-search i {
    color: var(--gray);
    font-size: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right .icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray-dark);
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right .icon-btn:hover {
    background: var(--gray-light);
    color: var(--primary);
}

.header-right .icon-btn .dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    border: 2px solid var(--white);
}

.header-right .divider {
    width: 1px;
    height: 32px;
    background: #eef2f7;
}

.header-right .avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform var(--transition);
}

.header-right .avatar:hover {
    transform: scale(1.05);
}

/* ===== CONTENT ===== */
.content {
    padding: 28px 32px 32px;
    flex: 1;
    overflow-y: auto;
}

/* ===== PAGE ===== */
.page {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.page-title small {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
    background: var(--gray-light);
    padding: 4px 14px;
    border-radius: 20px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
    text-decoration: none;
}

.btn i {
    font-size: 15px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 126, 158, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #1e8f4a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.btn-warning {
    background: var(--warning);
    color: white;
}
.btn-warning:hover {
    background: #e08e0b;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gray-dark);
    border: 2px solid #eef2f7;
}
.btn-outline:hover {
    background: var(--gray-light);
    border-color: #d0d7e2;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
}
.btn-sm i {
    font-size: 13px;
}

/* ===== TABLES ===== */
.table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 4px;
}

.table-toolbar {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.table-toolbar .filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.table-toolbar select {
    padding: 6px 14px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font);
    background: var(--white);
    color: var(--secondary);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
}

.table-toolbar select:focus {
    border-color: var(--primary);
}

.table-scroll {
    overflow-x: auto;
    padding: 0 4px 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead {
    background: #f8fafc;
}

table th {
    text-align: left;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    border-bottom: 1px solid #eef2f7;
}

table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f4f6f9;
    color: var(--secondary);
}

table tbody tr {
    transition: background var(--transition);
}

table tbody tr:hover {
    background: #f8fafc;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.confirmed { background: #e8f5e9; color: #2e7d32; }
.status-badge.confirmed::before { background: #4caf50; }

.status-badge.pending { background: #fff3e0; color: #e65100; }
.status-badge.pending::before { background: #ff9800; }

.status-badge.canceled { background: #fbe9e7; color: #c62828; }
.status-badge.canceled::before { background: #ef5350; }

.status-badge.waiting { background: #e3f2fd; color: #0d47a1; }
.status-badge.waiting::before { background: #42a5f5; }

.status-badge.ativo { background: #e8f5e9; color: #2e7d32; }
.status-badge.ativo::before { background: #4caf50; }

.status-badge.inativo { background: #fbe9e7; color: #c62828; }
.status-badge.inativo::before { background: #ef5350; }

.status-badge.agendado { background: #e3f2fd; color: #0d47a1; }
.status-badge.agendado::before { background: #42a5f5; }

.status-badge.realizado { background: #e8f5e9; color: #2e7d32; }
.status-badge.realizado::before { background: #4caf50; }

.status-badge.no-show { background: #fce4ec; color: #880e4f; }
.status-badge.no-show::before { background: #e91e63; }

.status-badge.assinado { background: #e8f5e9; color: #2e7d32; }
.status-badge.assinado::before { background: #4caf50; }

.status-badge.recusado { background: #fbe9e7; color: #c62828; }
.status-badge.recusado::before { background: #ef5350; }

.status-badge.entrada { background: #f3e5f5; color: #6a1b9a; }
.status-badge.entrada::before { background: #9c27b0; }

.status-badge.contatado { background: #e3f2fd; color: #0d47a1; }
.status-badge.contatado::before { background: #42a5f5; }

.status-badge.orcado { background: #fff3e0; color: #e65100; }
.status-badge.orcado::before { background: #ff9800; }

.status-badge.ganho { background: #e8f5e9; color: #2e7d32; }
.status-badge.ganho::before { background: #4caf50; }

.status-badge.perdido { background: #fbe9e7; color: #c62828; }
.status-badge.perdido::before { background: #ef5350; }

.status-badge.receita { background: #e8f5e9; color: #2e7d32; }
.status-badge.receita::before { background: #4caf50; }

.status-badge.despesa { background: #fbe9e7; color: #c62828; }
.status-badge.despesa::before { background: #ef5350; }

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 620px;
    width: 92%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: all var(--transition);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #fbe9e7;
    color: var(--danger);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: var(--gray-dark);
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #eef2f7;
    border-radius: 10px;
    font-size: 14px;
    transition: all var(--transition);
    font-family: var(--font);
    background: var(--white);
    color: var(--secondary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 126, 158, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray);
}

.loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
    color: var(--primary);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d0d7e2;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray);
    max-width: 400px;
    margin: 0 auto;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 14px 24px;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    animation: slideUp 0.35s ease;
    display: none;
    max-width: 420px;
    font-family: var(--font);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

.toast.show { display: block; }

/* ===== OVERLAY ===== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

.overlay.active { display: block; }

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .content { padding: 20px 24px; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 280px;
        height: 100vh;
        z-index: 200;
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.06);
    }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: block; }
    .header { padding: 0 16px; }
    .header-search input { width: 120px; font-size: 13px; }
    .header-search { padding: 2px 12px 2px 12px; }
    .content { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .modal { padding: 20px; width: 95%; }
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-toolbar .filter-group { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .header { padding: 0 12px; height: 60px; }
    .header-search input { width: 80px; font-size: 12px; padding: 8px 0; }
    .header-search { padding: 0 10px; }
    .header-right .icon-btn { width: 34px; height: 34px; font-size: 16px; }
    .header-right .avatar { width: 34px; height: 34px; font-size: 14px; }
    .header-right .divider { display: none; }
    .content { padding: 12px; }
    .page-title h1 { font-size: 17px; }
    .page-title small { font-size: 11px; padding: 2px 10px; }
    .btn { padding: 8px 16px; font-size: 13px; }
    table { font-size: 12px; }
    table th, table td { padding: 10px 12px; }
    .modal { padding: 16px; width: 98%; max-height: 96vh; }
    .modal-header h2 { font-size: 17px; }
    .toast { left: 16px; right: 16px; bottom: 16px; font-size: 13px; padding: 12px 18px; }
}

/* ===== UTILITIES ===== */
.fa-sync.spinning { animation: spin 0.8s linear infinite; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ===== STATS GRID (Dashboard) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #eef2f7;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.stat-icon.green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.stat-icon.orange { background: linear-gradient(135deg, #f39c12, #e67e22); }
.stat-icon.purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.stat-icon.red { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 2px;
}

.stat-info .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.stat-info .change {
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.stat-info .change.up { color: var(--success); }
.stat-info .change.down { color: var(--danger); }

/* ===== FOOTER INFO ===== */
.footer-info {
    margin-top: 36px;
    padding: 18px 0 8px;
    border-top: 1px solid #eef2f7;
    font-size: 13px;
    color: var(--gray);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.footer-info .items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-info .items span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== MODULE CARDS (Dashboard) ===== */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
}

.module-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
    transition: all var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.module-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.module-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: #eef2f7;
}

.module-card:hover::after {
    opacity: 1;
}

.module-card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.module-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.module-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary);
}

.module-card .card-header i {
    font-size: 20px;
    color: #d0d7e2;
    transition: color var(--transition);
}

.module-card:hover .card-header i {
    color: var(--primary);
}

.module-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 14px;
}

.module-card .tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.module-card .tag {
    display: inline-block;
    background: var(--gray-light);
    color: var(--gray-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.module-card .tag.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 16px;
}

.section-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--secondary);
}