@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* DESIGN TOKENS */
:root {
  --primary:#0f7a4a;--primary-dark:#085c35;--primary-light:#e8f9f0;--primary-glow:rgba(15,122,74,.15);
  --emerald:#059669;--teal:#0d9488;
  --accent:#f59e0b;--accent-2:#06b6d4;
  --danger:#e11d48;--danger-bg:#fff1f3;
  --warning:#d97706;--warning-bg:#fffbeb;
  --success:#059669;--success-bg:#ecfdf5;
  --info:#0284c7;--info-bg:#eff6ff;
  --sidebar-bg:#080f1a;--sidebar-border:rgba(255,255,255,.07);--sidebar-text:#7a92a3;
  --sidebar-text-hover:#e2e8f0;--sidebar-active-bg:rgba(15,122,74,.2);--sidebar-active-text:#4ade80;
  --sidebar-w:250px;
  --bg:#f4f7f5;--bg-2:#eaf0ec;--surface:#fff;--surface-2:#f8faf9;
  --border:#dfe8e2;--border-2:#ccd8d1;
  --text:#0d1f17;--text-2:#374b41;--text-muted:#6b7f75;--text-faint:#9bb0a5;
  --font-body:'DM Sans',system-ui,sans-serif;--font-display:'DM Serif Display',Georgia,serif;--font-mono:'JetBrains Mono','Fira Code',monospace;
  --radius-sm:6px;--radius:10px;--radius-md:14px;--radius-lg:20px;--radius-full:9999px;
  --shadow-xs:0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow:0 4px 6px -1px rgba(0,0,0,.07),0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-md:0 10px 15px -3px rgba(0,0,0,.08),0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-lg:0 20px 25px -5px rgba(0,0,0,.09),0 8px 10px -6px rgba(0,0,0,.04);
  --shadow-primary:0 4px 16px rgba(15,122,74,.22);
  --ease:cubic-bezier(.4,0,.2,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-spring:cubic-bezier(.34,1.56,.64,1);
  --z-sidebar:100;--z-topbar:50;
}

/* RESET */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:var(--font-body);font-size:15px;line-height:1.6;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:var(--primary);text-decoration:none}
a:hover{color:var(--primary-dark)}
img{max-width:100%;height:auto;display:block}
h1,h2,h3,h4,h5{font-family:var(--font-display);font-weight:400;line-height:1.2;letter-spacing:-.02em;color:var(--text)}

/* LAYOUT */
.container{max-width:1200px;margin:0 auto;padding:0 24px}
.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}
.justify-between{justify-content:space-between}.justify-center{justify-content:center}
.flex-wrap{flex-wrap:wrap}.flex-1{flex:1}.gap-1{gap:8px}.gap-2{gap:16px}.gap-3{gap:24px}.gap-4{gap:32px}
.grid{display:grid}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}
.text-sm{font-size:13px}.text-xs{font-size:11px}.text-muted{color:var(--text-muted)}.text-center{text-align:center}
.font-bold{font-weight:700}.font-mono{font-family:var(--font-mono)}.w-full{width:100%}.hidden{display:none!important}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 18px;border-radius:var(--radius);font-size:13.5px;font-weight:600;font-family:var(--font-body);cursor:pointer;border:1.5px solid transparent;transition:all .18s var(--ease);text-decoration:none;letter-spacing:-.01em;white-space:nowrap;position:relative;overflow:hidden}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:var(--shadow-primary)}
.btn-primary:hover{background:var(--primary-dark);border-color:var(--primary-dark);color:#fff;box-shadow:0 6px 20px rgba(15,122,74,.3)}
.btn-outline{background:transparent;border-color:var(--border-2);color:var(--text-2)}
.btn-outline:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-light)}
.btn-danger{background:var(--danger);color:#fff;border-color:var(--danger);box-shadow:0 4px 12px rgba(225,29,72,.2)}
.btn-danger:hover{background:#be1239;border-color:#be1239;color:#fff}
.btn-warning{background:var(--warning);color:#fff;border-color:var(--warning)}
.btn-ghost{background:transparent;border-color:transparent;color:var(--text-muted)}
.btn-ghost:hover{background:var(--bg-2);color:var(--text)}
.btn-sm{padding:6px 12px;font-size:12.5px;border-radius:var(--radius-sm)}
.btn-xs{padding:4px 9px;font-size:11.5px;border-radius:var(--radius-sm)}
.btn-lg{padding:13px 28px;font-size:15px}
.btn-icon{padding:8px;border-radius:var(--radius-sm)}

/* CARDS */
.card{background:var(--surface);border-radius:var(--radius-md);border:1px solid var(--border);box-shadow:var(--shadow-sm);overflow:hidden}
.card-header{padding:15px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px}
.card-title{font-family:var(--font-body);font-size:14.5px;font-weight:700;color:var(--text);letter-spacing:-.01em}
.card-body{padding:20px}

/* STAT CARDS */
.stat-card{background:var(--surface);border-radius:var(--radius-md);border:1px solid var(--border);box-shadow:var(--shadow-sm);padding:20px;position:relative;overflow:hidden;transition:transform .2s var(--ease),box-shadow .2s var(--ease)}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.stat-card::after{content:'';position:absolute;top:-20px;right:-20px;width:80px;height:80px;border-radius:50%;opacity:.07}
.stat-card .icon{width:42px;height:42px;border-radius:var(--radius);display:flex;align-items:center;justify-content:center;font-size:1.1rem;margin-bottom:14px}
.stat-card .value{font-family:var(--font-display);font-size:1.9rem;letter-spacing:-.03em;line-height:1;color:var(--text)}
.stat-card .label{font-size:11px;color:var(--text-muted);font-weight:500;margin-top:5px;letter-spacing:.03em;text-transform:uppercase}
.stat-green .icon{background:var(--success-bg);color:var(--success)} .stat-green::after{background:var(--success)}
.stat-blue  .icon{background:var(--info-bg);color:var(--info)}        .stat-blue::after{background:var(--info)}
.stat-amber .icon{background:var(--warning-bg);color:var(--warning)}  .stat-amber::after{background:var(--warning)}
.stat-red   .icon{background:var(--danger-bg);color:var(--danger)}    .stat-red::after{background:var(--danger)}
.stat-teal  .icon{background:#f0fdfa;color:var(--teal)}               .stat-teal::after{background:var(--teal)}

/* FORMS */
.form-group{margin-bottom:18px}
.form-label{display:block;font-size:11.5px;font-weight:700;color:var(--text-2);margin-bottom:6px;letter-spacing:.05em;text-transform:uppercase}
.form-control{width:100%;padding:9px 13px;border:1.5px solid var(--border);border-radius:var(--radius);font-size:14px;font-family:var(--font-body);background:var(--surface);color:var(--text);transition:border-color .18s,box-shadow .18s;outline:none}
.form-control:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow)}
.form-control::placeholder{color:var(--text-faint)}
textarea.form-control{resize:vertical;min-height:80px}
.form-select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7f75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-position:right 10px center;background-repeat:no-repeat;background-size:16px;padding-right:36px}
.errorlist{list-style:none}
.errorlist li{color:var(--danger);font-size:12px;margin-top:4px}

/* TABLE */
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse}
thead th{background:var(--surface-2);padding:10px 16px;text-align:left;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);border-bottom:1px solid var(--border);white-space:nowrap;font-family:var(--font-body)}
tbody td{padding:12px 16px;border-bottom:1px solid var(--border);font-size:13.5px;vertical-align:middle;color:var(--text-2)}
tbody tr{transition:background .12s}
tbody tr:hover{background:var(--bg)}
tbody tr:last-child td{border-bottom:none}

/* BADGES */
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:var(--radius-full);font-size:11px;font-weight:700;letter-spacing:.02em}
.badge::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.6;flex-shrink:0}
.badge-green{background:var(--success-bg);color:#166534}
.badge-red{background:var(--danger-bg);color:#be1239}
.badge-blue{background:var(--info-bg);color:var(--info)}
.badge-amber{background:var(--warning-bg);color:#92400e}
.badge-gray{background:var(--bg-2);color:var(--text-muted)}
.badge-teal{background:#f0fdfa;color:var(--teal)}

/* ALERTS */
.alert{display:flex;align-items:flex-start;gap:10px;padding:12px 16px;border-radius:var(--radius);font-size:13.5px;line-height:1.5;margin-bottom:12px;border:1px solid transparent;animation:fadeInSlide .3s var(--ease-out) both}
@keyframes fadeInSlide{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.alert-success{background:var(--success-bg);border-color:#a7f3d0;color:#166534}
.alert-error  {background:var(--danger-bg); border-color:#fecdd3;color:#9f1239}
.alert-warning{background:var(--warning-bg);border-color:#fde68a;color:#78350f}
.alert-info   {background:var(--info-bg);   border-color:#bfdbfe;color:#1e3a8a}

/* APP SHELL */
.app-layout{display:flex;min-height:100vh}

/* SIDEBAR */
.sidebar{
  width:var(--sidebar-w);background:var(--sidebar-bg);border-right:1px solid var(--sidebar-border);height:calc(var(--real-vh,1vh)*100);
  position:fixed;top:0;left:0;height:100vh;overflow-y:auto;overflow-x:hidden;
  z-index:var(--z-sidebar);display:flex;flex-direction:column;
  background-image:
    radial-gradient(ellipse at 30% 10%,rgba(15,122,74,.12) 0%,transparent 55%),
    radial-gradient(ellipse at 80% 90%,rgba(6,182,212,.07) 0%,transparent 50%);
}
.sidebar::-webkit-scrollbar{width:3px}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.1);border-radius:2px}

.sidebar-logo{padding:18px 18px 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--sidebar-border);flex-shrink:0}
.sidebar-logo img{height:32px;width:32px;object-fit:contain;border-radius:var(--radius-sm);filter:brightness(1.1)}
.sidebar-logo-text{font-family:var(--font-display);font-size:1.2rem;letter-spacing:-.03em;line-height:1}
.sidebar-logo-text .neo{color:#60a5fa}
.sidebar-logo-text .elimu{color:#4ade80}
.sidebar-tagline{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.18);margin-top:2px}

.sidebar-section{padding:8px 0}
.sidebar-section-title{padding:6px 18px 3px;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.16em;color:rgba(255,255,255,.18)}

.sidebar-link{display:flex;align-items:center;gap:10px;padding:9px 12px;margin:1px 8px;border-radius:var(--radius-sm);color:var(--sidebar-text);font-size:13.5px;font-weight:500;transition:all .15s var(--ease);text-decoration:none;position:relative}
.sidebar-link:hover{background:rgba(255,255,255,.07);color:var(--sidebar-text-hover)}
.sidebar-link.active{background:var(--sidebar-active-bg);color:var(--sidebar-active-text);font-weight:600}
.sidebar-link.active::before{content:'';position:absolute;left:-8px;top:20%;bottom:20%;width:3px;background:var(--sidebar-active-text);border-radius:0 3px 3px 0}
.sidebar-link .icon{font-size:.95rem;width:18px;text-align:center;flex-shrink:0;opacity:.85}
.sidebar-badge{margin-left:auto;background:var(--primary);color:#fff;font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;padding:0 5px}
.sidebar-divider{height:1px;background:var(--sidebar-border);margin:6px 20px}

.sidebar-user{margin-top:auto;padding:14px 16px;border-top:1px solid var(--sidebar-border);display:flex;align-items:center;gap:10px;flex-shrink:0}
.sidebar-avatar{width:34px;height:34px;border-radius:var(--radius-sm);background:linear-gradient(135deg,var(--primary),var(--teal));color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;flex-shrink:0;letter-spacing:-.01em}
.sidebar-user-info .name{font-size:12.5px;font-weight:600;color:rgba(255,255,255,.8);line-height:1.2;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-user-info .role{font-size:10.5px;color:rgba(255,255,255,.28);margin-top:1px}

/* TOPBAR */
.main-content{margin-left:var(--sidebar-w);flex:1;min-height:100vh;display:flex;flex-direction:column}
.topbar{background:var(--surface);border-bottom:1px solid var(--border);padding:0 26px;height:54px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:var(--z-topbar);gap:16px}
.topbar-title{font-weight:700;font-size:13.5px;color:var(--text);letter-spacing:-.01em;font-family:var(--font-body)}
.topbar-breadcrumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted)}
.topbar-breadcrumb .sep{opacity:.4}
.topbar-breadcrumb .current{color:var(--text);font-weight:600}
.page-content{padding:22px 26px;flex:1}

/* PAGE HEADER */
.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:16px;flex-wrap:wrap}
.page-header h1{font-size:1.55rem;color:var(--text);margin-bottom:2px}
.page-header .subtitle{font-size:13px;color:var(--text-muted);font-family:var(--font-body);font-weight:400}

/* PUBLIC NAV */
.public-nav{background:rgba(255,255,255,.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:200}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:60px}
.nav-logo{display:flex;align-items:center;gap:10px}
.nav-logo img{height:36px;border-radius:var(--radius-sm)}
.nav-logo-text{font-family:var(--font-display);font-size:1.35rem;letter-spacing:-.03em}
.nav-logo-text .neo{color:#2563eb}
.nav-logo-text .elimu{color:var(--primary)}
.nav-links{display:flex;align-items:center;gap:28px}
.nav-links a{font-size:14px;font-weight:500;color:var(--text-2);transition:color .15s;position:relative}
.nav-links a::after{content:'';position:absolute;bottom:-4px;left:0;right:0;height:2px;background:var(--primary);border-radius:1px;transform:scaleX(0);transition:transform .2s var(--ease)}
.nav-links a:hover{color:var(--primary)}
.nav-links a:hover::after{transform:scaleX(1)}
.nav-actions{display:flex;align-items:center;gap:10px}

/* HERO */
.hero{padding:72px 0 60px;position:relative;overflow:hidden;background:#fff}
.hero::before{content:'';position:absolute;inset:0;background-image:radial-gradient(circle at 20% 50%,rgba(15,122,74,.07) 0%,transparent 50%),radial-gradient(circle at 80% 20%,rgba(6,182,212,.05) 0%,transparent 40%);pointer-events:none}
.hero::after{content:'';position:absolute;top:0;right:0;width:54%;height:100%;background:linear-gradient(135deg,#f0fdf6 0%,#f0f9ff 100%);clip-path:polygon(12% 0%,100% 0%,100% 100%,0% 100%);pointer-events:none;z-index:0}
.hero .container{position:relative;z-index:1}
.hero-content{max-width:560px}
.hero-badge{display:inline-flex;align-items:center;gap:6px;background:var(--primary-light);color:var(--primary);border:1px solid rgba(15,122,74,.2);padding:5px 12px;border-radius:var(--radius-full);font-size:12px;font-weight:700;margin-bottom:20px;letter-spacing:.03em}
.hero-badge .dot{width:6px;height:6px;border-radius:50%;background:var(--primary);animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.8)}}
.hero h1{font-size:clamp(2.1rem,4vw,3rem);font-weight:400;color:var(--text);margin-bottom:18px;line-height:1.1}
.hero h1 em{font-style:italic;color:var(--primary)}
.hero p.lead{font-size:1.05rem;color:var(--text-muted);margin-bottom:28px;line-height:1.7}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.hero-image{position:relative;z-index:1;display:flex;align-items:center;justify-content:center}
.hero-image img{max-height:400px;filter:drop-shadow(0 24px 48px rgba(0,0,0,.12))}
.dashboard-mockup{width:100%;max-width:520px;animation:float 5s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}

/* SECTIONS */
.section{padding:80px 0}
.section-alt{background:var(--bg)}
.section-header{text-align:center;max-width:600px;margin:0 auto 52px}
.section-label{display:inline-block;background:var(--primary-light);color:var(--primary);border:1px solid rgba(15,122,74,.2);padding:4px 12px;border-radius:var(--radius-full);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin-bottom:12px}
.section h2{font-size:clamp(1.8rem,3vw,2.4rem);color:var(--text);margin-bottom:12px}
.section p.lead{font-size:1rem;color:var(--text-muted);line-height:1.7}

/* FEATURE CARDS */
.feature-card{background:var(--surface);border-radius:var(--radius-lg);padding:28px;border:1px solid var(--border);transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s;position:relative;overflow:hidden}
.feature-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--primary),var(--teal));transform:scaleX(0);transform-origin:left;transition:transform .3s var(--ease)}
.feature-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:var(--border-2)}
.feature-card:hover::before{transform:scaleX(1)}
.feature-icon{width:48px;height:48px;border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;font-size:1.3rem;margin-bottom:16px;background:var(--primary-light);color:var(--primary)}
.feature-card h3{font-size:1rem;font-family:var(--font-body);font-weight:700;margin-bottom:8px}
.feature-card p{font-size:14px;color:var(--text-muted);line-height:1.7}

/* FOOTER */
footer{background:#060d12;color:#64748b;padding:60px 0 28px;position:relative;overflow:hidden}
footer::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(74,222,128,.25),rgba(96,165,250,.25),transparent)}
.footer-grid{display:grid;grid-template-columns:2.2fr 1fr 1fr 1fr;gap:48px;margin-bottom:40px}
.footer-logo-text{font-family:var(--font-display);font-size:1.55rem;letter-spacing:-.03em;line-height:1;margin-bottom:12px}
.footer-logo-text .neo{color:#60a5fa}
.footer-logo-text .elimu{color:#4ade80}
footer p{font-size:14px;line-height:1.7;max-width:260px}
footer h4{font-family:var(--font-body);font-size:11px;font-weight:700;color:rgba(255,255,255,.5);text-transform:uppercase;letter-spacing:.12em;margin-bottom:14px}
footer a{font-size:14px;color:#475569;display:block;margin-bottom:8px;transition:color .15s}
footer a:hover{color:#94a3b8}
.footer-bottom{border-top:1px solid #0f172a;padding-top:20px;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#334155}

/* REPORT CARD */
.report-wrapper{max-width:820px;margin:0 auto}
.report-card-doc{background:white;padding:32px;border:1px solid #ddd;border-radius:var(--radius-md);font-family:var(--font-body);font-size:13.5px;box-shadow:var(--shadow-md)}
.rcard-header{text-align:center;padding-bottom:16px;border-bottom:3px solid var(--primary);margin-bottom:20px}
.rcard-header img{height:65px;margin:0 auto}
.rcard-header h2{font-size:1.1rem;font-family:var(--font-body);font-weight:800;color:var(--primary);margin:6px 0 3px}
.rcard-header p{font-size:12px;color:var(--text-muted)}
.rcard-title{text-align:center;font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin-bottom:20px}
.rcard-info{display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;margin-bottom:20px}
.rcard-info-row{display:flex;gap:8px;align-items:baseline;font-size:13px}
.rcard-info-row .lbl{font-weight:600;min-width:120px;color:var(--text-muted);font-size:12px}
.rcard-info-row .val{flex:1;border-bottom:1px dotted #ccc;padding-bottom:1px}
.rcard-table{width:100%;border-collapse:collapse;margin:12px 0;font-size:13px}
.rcard-table thead th{background:var(--primary);color:white;padding:8px 10px;text-align:left;font-size:12px}
.rcard-table tbody td{padding:7px 10px;border-bottom:1px solid #eee;vertical-align:middle}
.rcard-table tbody tr:nth-child(even) td{background:#f9f9f9}
.desc-table{width:100%;font-size:11px;border-collapse:collapse}
.desc-table th,.desc-table td{border:1px solid #ccc;padding:5px 6px;text-align:center}
.desc-table tr:first-child th{background:var(--primary);color:white;font-weight:600}
.rcard-sigs{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;margin-top:20px;font-size:12px}
.sig-block .sig-label{font-weight:700;margin-bottom:10px}
.sig-block .sig-line{border-top:1px solid #333;padding-top:5px;display:flex;justify-content:space-between}
.rcard-remarks{margin:16px 0}
.rcard-remarks label{font-weight:700;font-size:12px}
.rcard-remarks .line{border-bottom:1px solid #ccc;height:22px;margin-bottom:4px}

/* EMPTY STATE */
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;text-align:center;color:var(--text-muted)}
.empty-state .empty-icon{font-size:2.5rem;margin-bottom:12px;opacity:.4}
.empty-state .empty-title{font-size:15px;font-weight:600;color:var(--text-2);margin-bottom:6px;font-family:var(--font-body)}
.empty-state .empty-text{font-size:13px;max-width:280px}

/* PROGRESS */
.progress-bar{height:6px;background:var(--bg-2);border-radius:var(--radius-full);overflow:hidden}
.progress-fill{height:100%;border-radius:var(--radius-full);background:linear-gradient(90deg,var(--primary),var(--teal));transition:width .6s var(--ease-out)}

/* ANIMATIONS */
@keyframes fadeInUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.animate-fade-up{animation:fadeInUp .32s var(--ease-out) both}
.animate-fade{animation:fadeIn .28s var(--ease-out) both}
.stagger>*{animation:fadeInUp .32s var(--ease-out) both}
.stagger>*:nth-child(1){animation-delay:.04s}.stagger>*:nth-child(2){animation-delay:.08s}
.stagger>*:nth-child(3){animation-delay:.12s}.stagger>*:nth-child(4){animation-delay:.16s}
.stagger>*:nth-child(5){animation-delay:.20s}.stagger>*:nth-child(6){animation-delay:.24s}

/* MOBILE OVERLAY */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:calc(var(--z-sidebar) - 1);backdrop-filter:blur(2px)}
.sidebar-overlay.show{display:block}

/* INFO PANELS */
.info-panel{background:var(--info-bg);border:1px solid #bfdbfe;border-radius:var(--radius);padding:14px 16px;font-size:13.5px;color:#1e3a8a;line-height:1.6}
.warning-panel{background:var(--warning-bg);border:1px solid #fde68a;border-radius:var(--radius);padding:14px 16px;font-size:13.5px;color:#78350f;line-height:1.6}

/* SEARCH BAR COMPONENT */
.search-bar{display:flex;align-items:center;background:var(--surface);border:1.5px solid var(--border);border-radius:var(--radius);padding:0 13px;transition:border-color .18s,box-shadow .18s}
.search-bar:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow)}
.search-bar input{border:none;outline:none;font-size:14px;font-family:var(--font-body);background:transparent;color:var(--text);padding:9px 10px;flex:1;min-width:0}
.search-bar input::placeholder{color:var(--text-faint)}

/* SUMMARY ROWS */
.summary-row{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--border);font-size:14px}
.summary-row:last-child{border-bottom:none}
.summary-row .label{color:var(--text-muted)}
.summary-row .value{font-weight:700;font-family:var(--font-mono);font-size:13.5px}
.summary-row.total .label,.summary-row.total .value{font-size:16px;color:var(--text)}




/* ================================================================
   Reports & Analytics Module
   ================================================================ */

/* Reports hub grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.report-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, transform 0.18s;
}
.report-card:hover {
  box-shadow: 0 4px 18px rgba(27,79,114,0.13);
  transform: translateY(-2px);
  border-color: #2980b9;
}
.report-card-icon {
  font-size: 1.7rem;
  color: #1B4F72;
  min-width: 40px;
  text-align: center;
  margin-top: 2px;
}
.report-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1B4F72;
  margin-bottom: 4px;
}
.report-card-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Filter form */
.filter-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}
.filter-group select, .filter-group input {
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
}

/* Stats cards */
.stats-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 1.5rem 0;
}
.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.4rem;
  min-width: 140px;
  flex: 1;
}
.stat-card.accent { background: #1B4F72; color: #fff; border-color: #1B4F72; }
.stat-card.accent .stat-label { color: #a8d4f5; }
.stat-card.accent .stat-sub { color: #d0eafb; }
.stat-label { font-size: 0.78rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: #1B4F72; line-height: 1.1; }
.stat-card.accent .stat-value { color: #fff; }
.stat-sub { font-size: 0.8rem; color: #94a3b8; margin-top: 2px; }

/* Report section */
.report-section h2 { font-size: 1.2rem; color: #1B4F72; margin-bottom: 1rem; }
.report-section h3 { font-size: 1rem; color: #334155; margin: 1.5rem 0 0.6rem 0; border-left: 3px solid #2980b9; padding-left: 8px; }

/* Export bar */
.export-bar {
  display: flex;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem 0;
  flex-wrap: wrap;
}

/* Table improvements for reports */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { background: #1B4F72; color: #fff; padding: 8px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 7px 10px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.data-table tbody tr:nth-child(even) { background: #f1f8fd; }
.data-table tbody tr:hover { background: #dbeafe; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 1rem; }

/* Top rows highlight */
.top-row { background: #fef9e7 !important; }
.highlight-row { background: #d5f5e3 !important; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; }
.badge-level-8, .badge-level-7 { background: #d5f5e3; color: #1e8449; }
.badge-level-6, .badge-level-5 { background: #d6eaf8; color: #1a5276; }
.badge-level-4, .badge-level-3 { background: #fdebd0; color: #935116; }
.badge-level-2, .badge-level-1 { background: #fadbd8; color: #922b21; }
.badge-tie { background: #e8d5f5; color: #6c3483; font-size: 0.72rem; }

/* Alerts */
.alert { padding: 0.8rem 1rem; border-radius: 8px; margin: 1rem 0; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* Utility */
.text-success { color: #16a34a; }
.text-danger { color: #dc2626; }
.text-muted { color: #64748b; font-size: 0.88rem; margin-bottom: 1rem; }
.required { color: #dc2626; }
.page-sub { color: #64748b; margin-top: 4px; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 640px) {
  .reports-grid { grid-template-columns: 1fr; }
  .stats-cards { flex-direction: column; }
  .filter-row { flex-direction: column; }
  .filter-group { min-width: unset; width: 100%; }
}

/* ================================================================
   v18 — Mobile Responsiveness Patch
   ================================================================ */

/* ── Table wrapping (all tables) ── */
.table-wrap,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Cards with zero-padding table bodies get the wrapper treatment */
.card-body.p-0,
.card-body[style*="padding:0"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Sidebar overlay: unified class ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show,
.sidebar-overlay.active {
  display: block;
}

/* ── Filter/toolbar row ── */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.filter-group {
  min-width: 0;
}
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ── Button groups wrap ── */
.btn-group-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Page header actions ── */
.page-header .flex {
  flex-wrap: wrap;
}

/* ── Form: full-width inputs on mobile ── */
@media (max-width: 768px) {
  /* Sidebar */
  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    position: fixed;
    z-index: var(--z-sidebar);
    height: 100vh;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
  }
  #menu-btn {
    display: flex !important;
  }

  /* Grids collapse */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
  }

  /* Tables scroll */
  .table-wrap,
  .table-responsive {
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
  table {
    min-width: 480px;
  }

  /* Finance tables — slightly narrower min to prevent excessive scroll */
  .finance-table table {
    min-width: 420px;
  }

  /* Forms stack */
  .form-row {
    flex-direction: column !important;
  }
  .form-control,
  .form-select,
  select,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Filter sections wrap */
  .filter-row {
    flex-direction: column;
  }
  .filter-group {
    width: 100%;
  }
  .filter-group select,
  .filter-group input {
    width: 100%;
  }

  /* Buttons: touch-friendly & wrap */
  .btn {
    min-height: 40px;
    padding: .5rem .9rem;
    font-size: .88rem;
    white-space: normal;
    text-align: center;
  }
  .btn-sm {
    min-height: 36px;
    padding: .4rem .75rem;
    font-size: .85rem;
  }
  .btn-xs {
    min-height: 32px;
    font-size: .78rem;
  }

  /* Page header */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-header > div:last-child {
    flex-wrap: wrap;
  }

  /* Page content padding */
  .page-content {
    padding: .85rem !important;
  }
  .topbar {
    padding: 0 .85rem;
  }

  /* Stat cards value size */
  .stat-card .value {
    font-size: 1.5rem;
  }

  /* Card body quick links wrap */
  .card-body .flex.flex-wrap.gap-2 {
    gap: .5rem;
  }

  /* Finance form grids */
  .grid-3.finance-form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Net surplus card */
  .net-surplus-card {
    flex-direction: column;
    gap: .5rem;
  }
}

@media (max-width: 480px) {
  .topbar-title {
    font-size: .88rem;
  }
  .stat-card .value {
    font-size: 1.3rem;
  }
  .btn-xs {
    padding: .25rem .45rem;
  }
  table {
    min-width: 360px;
    font-size: .8rem;
  }
  thead th, tbody td {
    padding: 8px 10px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    width: 220px;
  }
  :root { --sidebar-w: 220px; }
}

/* ── Print overrides ── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .report-card-doc { box-shadow: none !important; border: none !important; }
  table { min-width: unset !important; }
  .table-wrap, .table-responsive { overflow: visible !important; }
}


/* ══════════════════════════════════════════════════════════════════════════
   PRINCIPAL DASHBOARD v19 — Compact Executive Layout
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.pd-page {
  max-width: 1280px;
  padding-bottom: 2rem;
}

/* ── Page header ── */
.pd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.pd-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.pd-title i { font-size: 1.1rem; color: var(--primary); }
.pd-subtitle {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}
.pd-no-term { color: #f59e0b; font-weight: 600; }
.pd-header-actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* ── Section labels ── */
.pd-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin: 1.4rem 0 .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.pd-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ──────────────────────────────────────────────────────────
   KPI GRID — 4 col desktop / 2 col tablet / 1 col mobile
   ────────────────────────────────────────────────────────── */
.pd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: .5rem;
}
.pd-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, #3b82f6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: .85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pd-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
/* Wide card spans 2 columns */
.pd-kpi-wide {
  grid-column: span 2;
}
.pd-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.pd-kpi-body { min-width: 0; }
.pd-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1.1;
}
.pd-kpi-of {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
.pd-kpi-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pd-kpi-sub {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Inline progress bar inside KPI card ── */
.pd-progress-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}
.pd-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.pd-progress-fill {
  height: 100%;
  background: var(--accent, #14b8a6);
  border-radius: 99px;
  width: 0%;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.pd-progress-fill--green { background: #10b981; }
.pd-progress-pct {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Large progress bar (inside card-body) */
.pd-progress-bar--lg {
  height: 10px;
  flex: none;
  width: 100%;
  margin: .75rem 0 .4rem;
}
.pd-progress-caption {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 0;
}

/* ──────────────────────────────────────────────────────────
   CHART GRID — 2 col desktop / 1 col mobile
   ────────────────────────────────────────────────────────── */
.pd-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-bottom: .5rem;
}
.pd-chart-card {}

/* Chart body constrains canvas height */
.pd-chart-body {
  padding: .75rem 1rem 1rem;
  position: relative;
}
.pd-chart-body--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chart box constrains canvas */
.pd-chart-box {
  position: relative;
  height: 240px;
  width: 100%;
}
.pd-chart-box canvas {
  max-height: 240px !important;
}
/* Small donut variant */
.pd-chart-box--donut {
  height: 220px;
  max-width: 260px;
}
.pd-chart-box--donut canvas {
  max-height: 220px !important;
}

/* ──────────────────────────────────────────────────────────
   COMPACT TABLES
   ────────────────────────────────────────────────────────── */
.pd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.pd-table thead tr {
  background: var(--surface-2, rgba(0,0,0,.03));
}
.pd-table th {
  padding: .45rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.pd-table td {
  padding: .45rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.pd-table tbody tr:last-child td { border-bottom: none; }
.pd-table tbody tr:hover td { background: var(--surface-2, rgba(0,0,0,.02)); }

.pd-th-rank { width: 32px; }
.pd-th-right { text-align: right !important; }
.pd-td-right { text-align: right; }

.pd-rank {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.pd-rank-top  { color: #f59e0b; }
.pd-rank-low  { color: #ef4444; }

.pd-student-name {
  font-weight: 600;
  font-size: .8rem;
}
.pd-table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.2rem !important;
  font-size: .8rem;
  font-style: italic;
}
.pd-table-empty i { margin-right: .3rem; }

/* Log table specifics */
.pd-table--logs th, .pd-table--logs td { font-size: .75rem; }
.pd-log-time { white-space: nowrap; color: var(--text-muted); }
.pd-log-action { max-width: 240px; word-break: break-word; }
.pd-log-module { white-space: nowrap; color: var(--text-muted); }
.pd-role-tag {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99,102,241,.1);
  color: #6366f1;
}

/* ──────────────────────────────────────────────────────────
   BADGES
   ────────────────────────────────────────────────────────── */
.pd-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}
.pd-badge-green  { background: rgba(16,185,129,.12); color: #059669; }
.pd-badge-red    { background: rgba(239,68,68,.12);  color: #dc2626; }
.pd-badge-orange { background: rgba(249,115,22,.12); color: #ea580c; }
.pd-badge-yellow { background: rgba(245,158,11,.12); color: #d97706; }

.pd-term-badge {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2, rgba(0,0,0,.04));
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────
   SUBMISSION STATS ROW
   ────────────────────────────────────────────────────────── */
.pd-submission-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}
.pd-sub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
}
.pd-sub-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--text);
}
.pd-sub-lbl {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.pd-sub-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ──────────────────────────────────────────────────────────
   EMPTY STATES
   ────────────────────────────────────────────────────────── */
.pd-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  margin-bottom: .75rem;
}
.pd-empty-icon {
  font-size: 2rem;
  color: var(--border);
  display: block;
  margin-bottom: .75rem;
}
.pd-empty-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 .3rem;
}
.pd-empty-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0;
}
.pd-empty-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: .8rem;
}
.pd-empty-inline i { font-size: 1.5rem; opacity: .4; }

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — Tablet (768px – 1023px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .pd-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-kpi-wide { grid-column: span 2; }
  .pd-chart-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — Mobile (max 639px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
  .pd-kpi-grid {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .pd-kpi-wide { grid-column: span 1; }
  .pd-kpi-value { font-size: 1.3rem; }
  .pd-kpi-card { padding: .7rem .85rem; }

  .pd-header { flex-direction: column; align-items: flex-start; }
  .pd-header-actions { width: 100%; }

  .pd-chart-box { height: 200px; }
  .pd-chart-box canvas { max-height: 200px !important; }
  .pd-chart-box--donut { max-width: 100%; }

  .pd-submission-row { gap: .75rem; }
  .pd-table th, .pd-table td { padding: .4rem .55rem; }
  .pd-table--logs .pd-log-action { max-width: 140px; }
}
/* ═════════════════════════════════════════════════════════════════════════ */

/* ── iOS: prevent auto-zoom on input focus (font-size must be >=16px) ── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* =====================================================
   v25: LOGO & NAVBAR FIX
   ===================================================== */
.nav-logo img {
  height: 44px !important;
  width: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
}
.nav-logo-text { display: none !important; }
.footer-logo-text { display: none !important; }

/* =====================================================
   v27: Landing + App Mobile Polish
   ===================================================== */
@media (max-width: 768px) {
  .public-nav {
    position: sticky;
    top: 0;
  }
  .public-nav .nav-inner {
    min-height: 58px;
    height: auto;
    gap: 8px;
    padding: 8px 0;
  }
  .public-nav .nav-links {
    display: none;
  }
  .public-nav .nav-actions {
    margin-left: auto;
    gap: 6px;
  }
  .public-nav .nav-actions .btn {
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
    font-size: .82rem;
  }
  .public-nav .nav-actions .btn-primary {
    min-width: 92px;
  }
  .public-nav .nav-logo img {
    height: 38px !important;
  }
  .landing-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 12px !important;
  }
}

@media (max-width: 390px) {
  .public-nav .nav-actions .btn {
    padding: 0 10px;
    font-size: .78rem;
  }
  .public-nav .nav-actions .btn-primary {
    min-width: 84px;
  }
  .public-nav .nav-logo img {
    height: 34px !important;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  .topbar {
    min-height: 56px;
    height: auto;
    padding: 8px 12px !important;
    gap: 10px;
  }
  .topbar > div {
    min-width: 0;
  }
  .topbar-title,
  .topbar-breadcrumb {
    min-width: 0;
    max-width: calc(100vw - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar .badge {
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page-content {
    padding: 14px 12px 76px !important;
  }
  .page-header {
    gap: 10px;
    margin-bottom: 14px;
  }
  .page-header h1,
  .page-title {
    font-size: 1.28rem;
    line-height: 1.2;
  }
  .card,
  .feature-card,
  .dashboard-card {
    border-radius: 10px;
  }
  .card-header {
    padding: 12px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .card-body:not(.p-0) {
    padding: 14px;
  }
  .filter-form,
  form.filter-form,
  .toolbar-row,
  .btn-group-wrap {
    width: 100%;
  }
  .filter-row,
  .toolbar-row,
  .btn-group-wrap {
    gap: 8px;
  }
  .filter-row .btn,
  .toolbar-row .btn,
  .btn-group-wrap .btn,
  .page-header .btn {
    flex: 1 1 140px;
    justify-content: center;
  }
  .table-wrap,
  .table-responsive,
  .card-body.p-0,
  .card-body[style*="padding:0"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table,
  .table-responsive table,
  .card-body.p-0 table,
  .card-body[style*="padding:0"] table {
    min-width: 620px;
  }
  .pd-chart-box {
    width: 100%;
    min-width: 0;
  }
  .pd-chart-box canvas,
  canvas {
    max-width: 100% !important;
  }
}
