/* =====================================================================
   CHITS - Community Health Information Tracking System
   Modern Clinical Design System (MediVerse theme)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ---------- Reset & Tokens ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary:          #0b6e9e;
    --primary-dark:     #084d6f;
    --primary-light:    #e6f3fa;
    --primary-glow:     rgba(11, 110, 158, 0.15);
    --accent:           #0d9488;
    --accent-dark:      #0f766e;
    --accent-light:     #ccfbf1;
    --surface:          #ffffff;
    --surface-raised:   #ffffff;
    --bg:               #f4f7fb;
    --bg-subtle:        #f8fafc;
    --text:             #0f172a;
    --text-secondary:   #334155;
    --text-muted:       #64748b;
    --border:           #e2e8f0;
    --border-light:     #f1f5f9;
    --danger:           #dc2626;
    --success:          #059669;
    --white:            #ffffff;
    --radius-sm:        8px;
    --radius:           12px;
    --radius-lg:        16px;
    --radius-xl:        24px;
    --radius-full:      9999px;
    --shadow-xs:        0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm:        0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md:        0 4px 14px rgba(15, 23, 42, 0.07);
    --shadow-lg:        0 12px 32px rgba(15, 23, 42, 0.1);
    --shadow-card:      0 0 0 1px rgba(15, 23, 42, 0.04), 0 4px 20px rgba(15, 23, 42, 0.06);
    --transition:       0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font:             'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --header-h:         72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Header & Navigation ---------- */
.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.navbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.875rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.925rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    display: none;
}

/* ---------- Hero (Home) ---------- */
.hero {
    background: linear-gradient(160deg, #064e6f 0%, var(--primary) 45%, #0d9488 100%);
    color: var(--white);
    padding: 5.5rem 1.75rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero .tagline {
    font-size: 1.125rem;
    opacity: 0.92;
    margin-bottom: 2rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    background-color: var(--white);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    box-shadow: var(--shadow-md);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--white);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background: var(--bg-subtle);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
}

/* ---------- Sections ---------- */
.section {
    padding: 4.5rem 1.75rem;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
}

.divider {
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 1rem auto;
    border-radius: var(--radius-full);
}

/* ---------- Feature Cards ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--border-light);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, var(--primary-light), var(--accent-light));
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.25rem auto;
    font-weight: 700;
}

.feature-card h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.65;
}

/* ---------- About Box ---------- */
.about-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.75rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.about-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 4px 0 0 4px;
}

.about-box h2 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.about-box p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.02rem;
    line-height: 1.75;
}

.about-box p:last-child {
    margin-bottom: 0;
}

/* ---------- Page Header ---------- */
.page-header {
    background: linear-gradient(160deg, #064e6f 0%, var(--primary) 50%, #0d9488 100%);
    color: var(--white);
    padding: 3.5rem 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.page-header h1 {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.05rem;
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Forms ---------- */
.form-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    max-width: 1000px;
    margin: -2rem auto 2rem auto;
    position: relative;
    z-index: 5;
    border: 1px solid var(--border-light);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: var(--text);
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.45rem;
    font-size: 0.875rem;
}

label .required {
    color: var(--danger);
    margin-left: 2px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background-color: var(--bg-subtle);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #cbd5e1;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea {
    resize: vertical;
    min-height: 96px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-submit {
    padding: 0.75rem 1.75rem;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-reset {
    padding: 0.75rem 1.75rem;
    background: var(--white);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-reset:hover {
    background: var(--bg-subtle);
    color: var(--text);
    border-color: #cbd5e1;
}

.patient-number-display {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0fdfa 100%);
    border: 1px solid rgba(11, 110, 158, 0.12);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.patient-number-display .label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.patient-number-display .number {
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--border-light);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.gallery-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.gallery-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.06);
}

.gallery-caption {
    padding: 1.25rem 1.35rem;
}

.gallery-caption h3 {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.gallery-caption p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- Contact ---------- */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-card .icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, var(--primary-light), var(--accent-light));
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 1rem auto;
}

.contact-card h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.developers-section {
    background: var(--surface);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.developers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.developer-card {
    text-align: center;
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.developer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(11, 110, 158, 0.2);
    background: var(--white);
}

.developer-avatar {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--accent));
    margin: 0 auto 1rem auto;
    box-shadow: 0 8px 24px var(--primary-glow);
    overflow: hidden;
    border: 3px solid var(--white);
    outline: 1px solid var(--border);
}

.developer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.developer-card h4 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.developer-card .role {
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 500;
}

.developer-card .email {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.925rem;
    line-height: 1.6;
    border: 1px solid transparent;
}

.alert ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.alert a {
    text-decoration: underline;
    font-weight: 600;
    margin-left: 0.5rem;
}

.alert-success {
    background-color: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* ---------- Patient Records Table ---------- */
.records-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background: var(--surface);
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.records-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.records-count strong {
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 700;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 480px;
    align-items: stretch;
}

.search-form input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-subtle);
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-form .btn-submit,
.search-form .btn-reset {
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-full);
}

.table-wrapper {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 1rem 1.15rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background-color: var(--primary-light);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid rgba(11, 110, 158, 0.12);
}

.empty-state {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.empty-state h3 {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ---------- Action Buttons ---------- */
.actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.btn-action {
    padding: 0.45rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--white);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-action.view {
    color: var(--primary);
    border-color: rgba(11, 110, 158, 0.35);
    background: var(--primary-light);
}

.btn-action.view:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-action.edit {
    color: var(--accent-dark);
    border-color: rgba(13, 148, 136, 0.35);
}

.btn-action.edit:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-action.delete {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.35);
}

.btn-action.delete:hover {
    background: var(--danger);
    color: var(--white);
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-add {
    padding: 0.65rem 1.35rem;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: inherit;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-add span[aria-hidden="true"] {
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 700;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition), transform var(--transition);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding: 2rem 1rem;
    overflow-y: auto;
    animation: overlayIn 0.2s ease-out;
}

.modal-overlay.open {
    display: flex;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin: auto 0;
    border: 1px solid var(--border-light);
}

.modal-confirm {
    max-width: 440px;
}

@keyframes modalIn {
    from { transform: translateY(16px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    background: linear-gradient(160deg, #064e6f, var(--primary));
    color: var(--white);
    padding: 1.15rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    background: var(--bg-subtle);
}

.modal-body .form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--surface);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ---------- View Modal ---------- */
.view-section-title {
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0;
    border-bottom: none;
}

.view-section-title:first-child {
    margin-top: 0;
}

.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.view-grid.full {
    grid-template-columns: 1fr;
}

.view-item {
    background: var(--white);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.view-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.view-item .value {
    color: var(--text);
    font-size: 0.925rem;
    word-break: break-word;
    line-height: 1.5;
}

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(180deg, #0c2d42 0%, #071f2e 100%);
    color: #94a3b8;
    padding: 3rem 1.75rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-col p,
.footer-col a {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.85;
    display: block;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    color: #64748b;
    font-size: 0.825rem;
    max-width: 1240px;
    margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .navbar {
        padding: 0.875rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        min-height: auto;
    }

    .nav-links {
        gap: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }

    .hero {
        padding: 4rem 1.25rem 4.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section {
        padding: 3rem 1.25rem;
    }

    .about-box {
        padding: 1.75rem 1.5rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn-submit,
    .btn-reset {
        width: 100%;
    }

    .records-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        max-width: none;
    }

    .modal {
        max-width: 100%;
        border-radius: var(--radius);
    }

    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 200px);
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn-submit,
    .modal-footer .btn-reset,
    .modal-footer .btn-danger {
        width: 100%;
    }

    .actions {
        flex-wrap: wrap;
    }

    .toolbar-actions {
        width: 100%;
    }

    .btn-add {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .developers-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .developers-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 640px;
    }
}

/* =====================================================================
   CHITS App Layout — Sidebar, Dashboard, Login
   ===================================================================== */

:root {
    --sidebar-w: 260px;
    --topbar-h: 64px;
}

body.app-body {
    display: block;
    min-height: 100vh;
    background: var(--bg);
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.app-content {
    flex: 1;
    padding: 1.5rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, #0c2d42 0%, #071f2e 100%);
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
}

.sidebar-brand .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand .logo-text strong {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.sidebar-brand .logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar-brand .logo-icon i {
    line-height: 1;
}

.sidebar-close {
    display: none;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all var(--transition);
}

.sidebar-nav a i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.sidebar-nav a.active {
    background: linear-gradient(145deg, var(--primary), var(--accent));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(11,110,158,0.3);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--accent));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.sidebar-user .user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user .user-info strong {
    color: var(--white);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-info span {
    font-size: 0.75rem;
    color: #64748b;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 150;
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.25rem;
    align-items: center;
    justify-content: center;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin: 0;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
    border: 1px solid var(--border-light);
    background: var(--white);
}

.topbar-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(11,110,158,0.2);
}

.topbar-btn.logout:hover {
    background: #fef2f2;
    color: var(--danger);
    border-color: #fecaca;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.topbar-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.topbar-user .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.badge-role {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.teal { background: var(--accent-light); color: var(--accent-dark); }
.stat-icon.green { background: #ecfdf5; color: var(--success); }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.red { background: #fef2f2; color: var(--danger); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
}

.panel-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.panel-body {
    padding: 1.25rem;
}

.panel-body.no-padding {
    padding: 0;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.quick-link i {
    font-size: 1.5rem;
    color: var(--primary);
}

.quick-link:hover {
    background: var(--primary-light);
    border-color: rgba(11,110,158,0.2);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.notif-list {
    list-style: none;
}

.notif-item {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.notif-item:last-child { border-bottom: none; }

.notif-item.unread {
    background: var(--primary-light);
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.notif-item.read .notif-dot { background: var(--border); }

.notif-content strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.notif-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.notif-content .notif-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Login Page */
body.login-body {
    display: block;
    min-height: 100vh;
    margin: 0;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

/* Centered login (single card, no side panel) */
.login-page--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(160deg, #064e6f 0%, var(--primary) 45%, #0d9488 100%);
}

.login-page--centered::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.login-page--centered .login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 0;
}

.login-page--centered .login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.login-page--centered .login-brand .logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.login-page--centered .login-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.login-page--centered .login-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.login-page--centered .login-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Left — branding */
.login-hero {
    background: linear-gradient(160deg, #064e6f 0%, var(--primary) 45%, #0d9488 100%);
    color: var(--white);
    padding: 3rem 3.5rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.login-hero-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.login-hero-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-hero-brand .logo-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    font-size: 1.4rem;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.login-hero-brand h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.login-hero-brand p {
    font-size: 0.8rem;
    opacity: 0.85;
    margin: 0.15rem 0 0;
    line-height: 1.4;
}

.login-hero .hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.login-hero-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.login-hero-text {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.login-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.925rem;
    opacity: 0.92;
}

.login-features li i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Right — form panel */
.login-panel {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2.25rem;
}

.login-card-header {
    margin-bottom: 1.75rem;
}

.login-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.login-card-header p {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 1.15rem;
}

.login-form .alert-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.input-icon-wrap input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background-color: var(--bg-subtle);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.input-icon-wrap input:hover {
    border-color: #cbd5e1;
}

.input-icon-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-icon-wrap input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.login-submit {
    width: 100%;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
}

.login-demo {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.login-demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.login-demo-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-demo-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.login-demo-hint code {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.login-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.demo-account-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all var(--transition);
}

.demo-account-btn i {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.demo-account-btn .demo-user {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.demo-account-btn .demo-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.demo-account-btn:hover {
    background: var(--primary-light);
    border-color: rgba(11, 110, 158, 0.25);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 960px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 2.5rem 2rem;
    }

    .login-hero-title {
        font-size: 1.35rem;
    }

    .login-features {
        display: none;
    }

    .login-hero-text {
        margin-bottom: 0;
        font-size: 0.925rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
        box-shadow: none;
        border: none;
        background: transparent;
    }

    .login-panel {
        padding: 1.5rem 1rem;
        align-items: flex-start;
    }

    .login-demo-grid {
        grid-template-columns: 1fr;
    }
}

/* Filters bar & tab navigation */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.filter-tab:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: rgba(11, 110, 158, 0.2);
}

.filter-tab.active {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.filters-bar select,
.filters-bar input[type="text"],
.filters-bar input[type="date"] {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    min-width: 140px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
}

.filters-bar .toolbar-spacer {
    flex: 1;
    min-width: 0.5rem;
}

/* Module page content area */
.module-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.module-page .alert {
    margin-bottom: 1.25rem;
}

/* Consistent empty states inside tables */
.data-table .empty-row td {
    text-align: center;
    padding: 2.5rem 1rem !important;
    color: var(--text-muted);
    font-size: 0.925rem;
}

/* Panel header icons */
.panel-header h2 i {
    color: var(--primary);
    margin-right: 0.35rem;
}

/* Records toolbar — align with filters on module pages */
.records-toolbar {
    margin-bottom: 1.25rem;
}

.records-toolbar .search-form select {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-subtle);
    min-width: 120px;
}

/* Remove legacy duplicate filters-bar block below */

/* Pagination */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 0.75rem 0;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    gap: 0.35rem;
}

.btn-page {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--white);
    transition: all var(--transition);
}

.btn-page:hover,
.btn-page.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Print styles */
@media print {
    .sidebar, .topbar, .records-toolbar, .filters-bar,
    .pagination-nav, .actions, .btn-add, .sidebar-overlay { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 0 !important; }
    body { background: white; }
}

/* Status badges */
.badge-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-info    { background: var(--primary-light); color: var(--primary-dark); }

/* Responsive app layout */
@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .topbar-user { display: none; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close { display: flex; align-items: center; justify-content: center; }
    .sidebar-overlay.open { display: block; }
    .app-main { margin-left: 0; }
    .btn-icon { display: flex; }
    .app-content { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .filters-bar select, .filters-bar input { width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}
