/* Premium PD Pal Theme
     Brand palette and layout system
*/
:root{
    --brand-blue: #0DB7F4;
    --brand-dark: #1E293B;
    --brand-white: #FFFFFF;
    --brand-bg: #F8FAFC;
    --brand-slate-100: #E2E8F0;
    --brand-slate-200: #CBD5E1;
    --brand-slate-400: #94A3B8;
    --brand-slate-700: #334155;
    --brand-slate-900: #0F172A;
    --accent-green: #10B981;
    --accent-amber: #F59E0B;
    --accent-red: #EF4444;

    --muted: var(--brand-slate-700);

    --s-xxs: 4px; --s-xs:8px; --s-sm:12px; --s-md:16px; --s-lg:24px; --s-xl:32px; --s-xxl:48px;
    --radius: 12px;
    --shadow-soft: 0 14px 44px rgba(15,23,42,0.08);
    --shadow-pop: 0 18px 60px rgba(15,23,42,0.1);
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
    font-family: 'Open Sans', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height:100%;
    background: var(--brand-bg);
    color: var(--brand-slate-900);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

/* Layout */
.app-shell{display:flex;min-height:100vh}
.sidebar{width:280px;background:var(--brand-white);border-right:1px solid rgba(148,163,184,0.16);padding:calc(var(--s-lg) + 4px);position:sticky;top:0;align-self:stretch;display:flex;flex-direction:column;justify-content:flex-start}
.sidebar-top{display:grid;gap:28px}
.sidebar .brand{display:flex;align-items:center;gap:14px;margin-bottom:4px}
.logo-mark{width:auto;min-width:46px;height:46px;border-radius:0;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--brand-white);background:none;box-shadow:none;font-size:18px;overflow:hidden;padding:0}
.logo-mark img{height:46px;width:auto;object-fit:contain;display:block}
.brand-title{font-weight:800;font-size:18px;color:var(--brand-slate-900)}
.brand-subtitle{font-size:13px;color:var(--brand-slate-500);margin-top:2px}
.profile-card{display:flex;align-items:center;gap:14px;padding:16px;border-radius:16px;background:var(--brand-slate-50);box-shadow:var(--shadow-soft)}
.profile-avatar{width:44px;height:44px;border-radius:14px;background:var(--brand-blue);color:var(--brand-white);display:flex;align-items:center;justify-content:center;font-weight:700}
.profile-name{font-weight:700;color:var(--brand-slate-900)}
.profile-role{font-size:13px;color:var(--brand-slate-500)}
.nav{margin-top:22px;display:flex;flex-direction:column;gap:10px}
.nav-link{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:14px;color:var(--brand-slate-700);text-decoration:none;font-weight:700;transition:background 0.2s ease,color 0.2s ease}
.nav-link:hover{background:rgba(13,183,244,0.08);color:var(--brand-blue)}
.nav-link.active{background:var(--brand-blue);color:var(--brand-white);box-shadow:var(--shadow-soft)}
.nav-icon{font-size:16px}
.sidebar-footer{margin-top:auto;padding:16px 0 12px}
.btn-ghost{background:transparent;color:var(--brand-blue);border:1px solid rgba(13,183,244,0.16)}

.main{flex:1;display:flex;flex-direction:column}
.topbar{padding:var(--s-lg);display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap}
.topbar h1{font-size:32px;font-weight:800;color:var(--brand-slate-900);margin-bottom:8px}
.topbar-subtitle{font-size:15px;color:var(--brand-slate-600);max-width:640px}
.eyebrow{font-size:12px;font-weight:800;color:var(--brand-blue);letter-spacing:0.08em;text-transform:uppercase;margin-bottom:8px}
.topbar-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}

.page-content{padding:var(--s-lg);display:flex;flex-direction:column;gap:24px}
.page-section{display:flex;flex-direction:column;gap:18px}
.section-header{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
.section-header h2{font-size:24px;margin-bottom:6px}
.section-description{color:var(--brand-slate-500);max-width:720px;line-height:1.6}
.card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.dashboard-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:24px;}
.dashboard-main-grid{grid-template-columns:1.3fr 0.85fr;margin-top:20px;}
.trainers-grid{grid-template-columns:2.2fr 1fr;}
.course-unit-grid{grid-template-columns:1fr 1fr;}
.report-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.settings-grid{grid-template-columns:1fr 1fr;}
.summary-card{padding:22px;display:flex;flex-direction:column;gap:10px}
.summary-label{font-size:13px;color:var(--brand-slate-500);text-transform:uppercase;letter-spacing:0.08em}
.summary-value{font-size:32px;font-weight:800;color:var(--brand-slate-900)}
.card-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.filter-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px}
.filter-input, .filter-row select{min-width:140px;border:1px solid rgba(148,163,184,0.35);background:var(--brand-slate-50);border-radius:14px;padding:12px 14px;font:inherit;color:var(--brand-slate-900);}
.table-container{overflow-x:auto}
.coverage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}
.coverage-card{padding:18px;border-radius:18px;display:flex;flex-direction:column;gap:10px;border:1px solid rgba(148,163,184,0.16);}
.coverage-card.coverage-good{background:rgba(16,185,129,0.08)}
.coverage-card.coverage-warning{background:rgba(245,158,11,0.1)}
.coverage-card.coverage-critical{background:rgba(239,68,68,0.1)}
.coverage-title{font-weight:700;color:var(--brand-slate-900)}
.coverage-name{color:var(--brand-slate-700)}
.coverage-meta{font-size:13px;color:var(--brand-slate-500)}
.alert-row{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:16px 0;border-bottom:1px solid rgba(148,163,184,0.16)}
.alert-title{font-weight:700;color:var(--brand-slate-900)}
.alert-text{color:var(--brand-slate-500);font-size:14px}
.activity-feed{display:flex;flex-direction:column;gap:12px}
.activity-item{padding:14px 16px;border-radius:14px;background:var(--brand-slate-50);color:var(--brand-slate-700)}
.profile-summary, .profile-details{padding:20px;background:var(--brand-white);border-radius:18px;box-shadow:var(--shadow-soft)}
.trainer-profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.info-block{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid rgba(148,163,184,0.14)}
.info-block strong{color:var(--brand-slate-800)}
.report-card{display:flex;flex-direction:column;gap:16px;min-height:180px;}
.report-title{font-weight:700;font-size:18px}
.report-value{color:var(--brand-slate-500);line-height:1.6}
.report-toolbar-card{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;align-items:center;margin-bottom:18px;}
.report-tabs{display:flex;gap:12px;flex-wrap:wrap;}
.report-tab{border:1px solid rgba(14,165,233,0.2);background:var(--brand-white);color:var(--brand-blue);padding:10px 18px;border-radius:999px;cursor:pointer;transition:all 0.2s ease;}
.report-tab.active{background:var(--brand-blue);color:var(--brand-white);border-color:transparent;}
.report-tab:hover{background:rgba(13,183,244,0.16);}
.modal-tabs{display:flex;gap:10px;margin-bottom:18px;}
.modal-tabs .tab{border:1px solid rgba(148,163,184,0.3);background:var(--brand-slate-50);color:var(--brand-slate-900);padding:10px 16px;border-radius:999px;cursor:pointer;transition:all 0.2s ease;}
.modal-tabs .tab.active{background:var(--brand-blue);color:var(--brand-white);border-color:transparent;}
.modal-tabs .tab:hover{background:rgba(13,183,244,0.12);}
.report-action-group{display:flex;gap:12px;flex-wrap:wrap;}
.report-filters-card{padding:18px 20px;display:flex;flex-direction:column;gap:14px;margin-bottom:18px;}
.report-filters-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.report-filters-card input[type="text"],
.report-filters-card select,
.report-filters-card input[type="date"]{min-width:180px;padding:10px 12px;border:1px solid rgba(148,163,184,0.35);border-radius:14px;background:var(--brand-white);font:inherit;}
.report-summary-card{padding:22px 20px;}
.report-table-card{padding:0;overflow-x:auto;}
.report-table-card table{width:100%;border-collapse:collapse;}
.report-table-card th, .report-table-card td{padding:14px 16px;text-align:left;border-bottom:1px solid rgba(148,163,184,0.12);}
.report-header-card{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.report-empty{padding:40px;text-align:center;color:var(--brand-slate-500);}

@media (max-width:1100px){.dashboard-summary-grid, .dashboard-main-grid, .trainers-grid, .course-unit-grid, .report-grid, .settings-grid, .coverage-grid, .trainer-profile-grid{grid-template-columns:1fr}}
@media (max-width:760px){.topbar{flex-direction:column;align-items:flex-start}.topbar-actions{width:100%;justify-content:flex-start}.topbar-actions .btn{flex:1}.sidebar{width:100%;position:relative;border-right:none;border-bottom:1px solid rgba(148,163,184,0.16)}.sidebar-nav{flex-direction:row;flex-wrap:wrap}.sidebar-nav .nav-link{flex:1 1 100%;}}

/* Cards */
.card{background:var(--brand-white);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow-soft);border:1px solid rgba(148,163,184,0.18);}
.card h3{font-size:18px;margin-bottom:16px;color:var(--brand-slate-900);font-weight:700}
.card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.upload-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}
.recent-card{overflow:hidden}
.evidence-review-card{background:var(--brand-slate-50);border-radius:16px;padding:18px;margin-bottom:16px;border:1px solid rgba(148,163,184,0.18)}
.evidence-review-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.evidence-review-header .evidence-title{font-weight:700;font-size:15px;margin-bottom:4px}
.review-response-textarea{width:100%;min-height:90px;padding:12px;border:1px solid rgba(148,163,184,0.35);border-radius:12px;font:inherit;color:var(--brand-slate-900);resize:vertical;margin-bottom:10px}
.evidence-actions{display:flex;justify-content:flex-end}
.muted{color:var(--brand-slate-500);font-weight:500}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 18px;border-radius:999px;font-weight:700;border:none;cursor:pointer;transition:all 0.2s ease;background:var(--brand-blue);color:var(--brand-white);}
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-ghost{
    background:var(--brand-blue);
    color:var(--brand-white);
    border:none;
    box-shadow:none;
}
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-accent:hover,
.btn-ghost:hover{
    background:rgba(13,183,244,0.12);
    color:var(--brand-slate-700);
    transform:translateY(0);
    box-shadow:none;
}

.login-page{min-height:100vh;background:linear-gradient(180deg,#F4F9FF,#E9F2FF);display:flex;align-items:center;justify-content:center;padding:24px}
.login-shell{width:min(1140px,100%);}
.login-panel{display:grid;grid-template-columns:1fr 1fr;gap:24px;}
.login-card{border-radius:28px;overflow:hidden;box-shadow:var(--shadow-pop);}
.login-card-left{background:var(--brand-white);padding:40px;display:flex;flex-direction:column;gap:32px;}
.login-branding{display:flex;align-items:center;gap:16px;}
.login-branding .logo-mark{width:54px;height:54px;border-radius:18px;background:var(--brand-slate-50);display:flex;align-items:center;justify-content:center;box-shadow:0 20px 60px rgba(15,23,42,0.08);overflow:hidden;}
.login-branding .logo-mark img{width:32px;height:auto;display:block;}
.login-branding .brand-title{font-size:18px;font-weight:800;letter-spacing:0.06em;color:var(--brand-slate-900);}
.login-copy h1{font-size:32px;line-height:1.05;color:var(--brand-slate-900);margin-bottom:12px;}
.login-copy p{max-width:520px;color:var(--brand-slate-600);line-height:1.75;font-size:16px;}
.login-form{display:flex;flex-direction:column;gap:20px;}
.form-field{display:flex;flex-direction:column;gap:10px;}
.form-field label{font-size:14px;color:var(--brand-slate-700);font-weight:600;}
.field-input-icon{position:relative;}
.input-icon{position:absolute;top:50%;left:16px;transform:translateY(-50%);font-size:16px;color:var(--brand-slate-400);pointer-events:none;}
.field-input-icon input{width:100%;padding:16px 16px 16px 48px;border:1px solid rgba(148,163,184,0.3);border-radius:16px;background:var(--brand-white);font:inherit;color:var(--brand-slate-900);transition:border-color 0.2s ease,box-shadow 0.2s ease;}
.field-input-icon input:focus{outline:none;border-color:var(--brand-blue);box-shadow:0 0 0 4px rgba(13,183,244,0.15);}
.login-form-meta{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px;width:100%;}
.checkbox-label{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--brand-slate-700);white-space:nowrap;}
.checkbox-label input{width:16px;height:16px;border:1px solid rgba(148,163,184,0.4);border-radius:4px;}
.text-link{font-size:14px;color:var(--brand-blue);text-decoration:none;font-weight:600;white-space:nowrap;}
.text-link:hover{text-decoration:underline;}
.login-submit{width:100%;padding:16px;}
.login-card-right{background:linear-gradient(135deg,#0568B8 0%,#0DB7F4 100%);color:var(--brand-white);padding:40px;display:flex;align-items:center;justify-content:center;}
.login-panel-content{max-width:520px;}
.login-panel-content h2{font-size:32px;line-height:1.05;margin-bottom:20px;}
.login-panel-content p{font-size:17px;line-height:1.8;color:rgba(255,255,255,0.88);}

@media (max-width:960px){.login-panel{grid-template-columns:1fr;}.login-card-right{min-height:320px;}}
@media (max-width:640px){.login-page{padding:16px;}.login-card-left,.login-card-right{padding:28px;}.login-copy h1{font-size:28px;}.login-panel-content h2{font-size:28px;}.field-input-icon input{padding:14px 14px 14px 44px;}.login-form-meta{flex-direction:column;align-items:flex-start;}.login-submit{padding:14px;}}

/* Dashboard stat */
.stats{display:flex;gap:12px}
.stat{flex:1;padding:18px;border-radius:12px;background:#0DB7F4;color:#fff;box-shadow:var(--shadow-pop)}
.stat .value{font-size:20px;font-weight:800}
.stat .label{opacity:0.9}

.snapshot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.snapshot-card{background:var(--brand-white);border-radius:18px;padding:24px;box-shadow:var(--shadow-soft);display:grid;gap:12px}
.metric-card{background:linear-gradient(135deg,#06b6d4 0%,#0ea5e9 100%);color:#fff;box-shadow:var(--shadow-pop);border:1px solid rgba(255,255,255,0.12)}
.metric-card .snapshot-card-title{color:rgba(255,255,255,0.92);text-transform:uppercase;letter-spacing:0.08em;font-size:13px}
.metric-card .snapshot-card-value{font-size:32px;font-weight:800;color:#ffffff}
.metric-card .snapshot-card-subtext{color:rgba(255,255,255,0.85)}
.snapshot-card-icon{width:40px;height:40px;border-radius:14px;background:rgba(13,183,244,0.12);display:flex;align-items:center;justify-content:center;font-size:18px}
.snapshot-card-title{font-size:13px;font-weight:700;color:var(--brand-slate-600);text-transform:uppercase;letter-spacing:0.08em}
.snapshot-card-value{font-size:32px;font-weight:800;color:var(--brand-slate-900)}
.snapshot-card-subtext{font-size:13px;color:var(--brand-slate-500);line-height:1.6}
.currency-ring-card{text-align:center}
.ring-chart{position:relative;width:100%;aspect-ratio:1/1;background:var(--brand-slate-50);border-radius:999px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.ring-chart canvas{width:100%!important;height:100%!important}
.ring-label{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:var(--brand-slate-900);font-weight:800}
.ring-label small{font-size:12px;color:var(--brand-slate-500);font-weight:600}
.ring-caption{font-size:13px;color:var(--brand-slate-500)}

.upload-dropzone{display:flex;align-items:center;justify-content:center;min-height:180px;border:2px dashed rgba(13,183,244,0.32);border-radius:20px;background:rgba(13,183,244,0.06);cursor:pointer;transition:border-color 0.2s ease,background 0.2s ease}
.upload-dropzone:hover{border-color:var(--brand-blue);background:rgba(13,183,244,0.14)}
.dropzone-content{display:flex;align-items:center;gap:16px;text-align:center;color:var(--brand-slate-700)}
.dropzone-icon{font-size:28px}
.file-preview{display:grid;gap:10px;margin-top:14px}
.file-preview > div{background:var(--brand-slate-100);border-radius:14px;padding:12px 14px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.file-preview button{border:none;background:none;color:var(--brand-slate-500);cursor:pointer;font-size:16px}
.form-actions{display:flex;flex-direction:column;gap:14px}
.upload-progress-bar{position:relative;height:10px;background:var(--brand-slate-100);border-radius:999px;overflow:hidden}
.upload-progress-fill{position:absolute;left:0;top:0;height:100%;background:var(--brand-blue);transition:width 0.4s ease}
.upload-progress-text{margin-top:8px;font-size:13px;color:var(--brand-slate-500)}
.hidden{display:none}
.form-row{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}
.form-label{font-size:14px;font-weight:700;color:var(--brand-slate-700)}
.form-row input,
.form-row select,
.form-row textarea{width:100%;border:1px solid rgba(148,163,184,0.35);background:var(--brand-slate-50);border-radius:14px;padding:14px 16px;font:inherit;color:var(--brand-slate-900)}
.form-row select{appearance:none}
.form-row textarea{min-height:110px;resize:vertical}
.btn-block{width:100%;justify-content:center}
.form-message{padding:12px 16px;border-radius:12px;font-size:14px;font-weight:500}
.form-message.success{background:rgba(16,185,129,0.12);color:var(--accent-green);border:1px solid rgba(16,185,129,0.3)}
.form-message.error{background:rgba(239,68,68,0.12);color:var(--accent-red);border:1px solid rgba(239,68,68,0.3)}
.quick-actions-card{display:flex;flex-direction:column;gap:18px;background:var(--brand-white);border-radius:20px;padding:24px;box-shadow:var(--shadow-soft)}
.quick-actions-body{display:flex;flex-direction:column;gap:12px}
.quick-actions-divider{height:1px;background:rgba(148,163,184,0.18);margin:0 -24px}

.compliance-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:20px}
.status-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;font-weight:700;font-size:13px}
.status-pill-ready{background:rgba(13,183,244,0.12);color:var(--brand-blue)}
.status-pill-good{background:rgba(16,185,129,0.14);color:var(--accent-green)}
.status-pill-warning{background:rgba(245,158,11,0.14);color:var(--accent-amber)}
.status-pill-alert{background:rgba(239,68,68,0.12);color:var(--accent-red)}
.progress-block{display:flex;flex-direction:column;gap:12px}
.progress-label-row{display:flex;justify-content:space-between;font-size:13px;color:var(--brand-slate-600)}
.progress-bar{height:12px;background:var(--brand-slate-100);border-radius:999px;overflow:hidden}
.progress-fill{height:100%;border-radius:999px;transition:width 0.4s ease;background:var(--brand-blue)}
.progress-fill.warning{background:var(--accent-amber)}
.progress-fill.alert{background:var(--accent-red)}
.reports-grid{display:grid;gap:18px}
.report-widget{background:var(--brand-slate-50);border-radius:18px;padding:18px;display:grid;gap:18px}
.report-widget-header{display:flex;justify-content:space-between;align-items:center;font-weight:700;color:var(--brand-slate-900)}
.report-value{font-size:14px;color:var(--brand-slate-600)}
.reports-note{font-size:13px;color:var(--brand-slate-500);margin-top:14px}

/* Tables */
.table{width:100%;border-collapse:collapse;background:var(--brand-white);border-radius:14px;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,0.04)}
.table th,.table td{padding:14px 16px;text-align:left;border-bottom:1px solid rgba(148,163,184,0.18)}
.table thead{background:var(--brand-slate-50)}
.table tbody tr:hover{background:rgba(13,183,244,0.06)}
.recent-table-container{overflow-x:auto}
.recent-table th{font-size:12px;color:var(--brand-slate-500);text-transform:uppercase;letter-spacing:0.08em}
.status-badge{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:700}
.status-badge.review{background:rgba(13,183,244,0.12);color:var(--brand-blue)}
.status-badge.mapped{background:rgba(16,185,129,0.14);color:var(--accent-green)}
.status-badge.alert{background:rgba(239,68,68,0.12);color:var(--accent-red)}
.link-btn{background:transparent;border:none;color:var(--brand-blue);font-weight:700;cursor:pointer}

/* Trainer Matrix unit card */
.unit-card{border-radius:10px;padding:12px;background:var(--brand-white);box-shadow:var(--shadow-soft);border:1px solid var(--brand-grey-200)}
.unit-card textarea{width:100%;min-height:80px;padding:8px;border:1px solid var(--brand-grey-200);border-radius:8px}

/* Modals & overlays */
.modal-backdrop{position:fixed;inset:0;background:rgba(10,10,10,0.45);display:flex;align-items:center;justify-content:center;z-index:2000}
.modal-window{width:720px;background:var(--brand-white);border-radius:12px;padding:20px;box-shadow:var(--shadow-pop)}

/* Toasts */
.toasts{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:10px;z-index:3000}
.toast{background:var(--brand-white);padding:12px 14px;border-radius:8px;box-shadow:var(--shadow-soft);border-left:4px solid var(--brand-blue)}

/* Responsive */
@media (max-width:1000px){.content{grid-template-columns:1fr}.sidebar{display:none}.topbar input{min-width:160px}}
@media (max-width:600px){.grid{grid-template-columns:1fr}.stats{flex-direction:column}}

/* Small helpers */
.row{display:flex;gap:12px;align-items:center}
.space{height:var(--s-lg)}

/* Login Page */
.login-container {
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 10%, rgba(13,183,244,0.08), transparent 10%),
                linear-gradient(180deg, rgba(255,212,0,0.03), transparent 40%);
}

.login-box {
    background: white;
    background: var(--brand-orange);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: var(--brand-blue);
    margin-bottom: 10px;
    background: var(--brand-blue);
    display:flex;justify-content:center;align-items:center;gap:12px;
}

.subtitle {
    text-align: center;
    background: var(--brand-orange);
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    background: var(--brand-blue);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 6px 18px rgba(13,183,244,0.08);
}

.form-group button {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.form-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13,183,244,0.12);
}

.form-group button:active {
    transform: translateY(1px);
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    padding: 10px;
    background-color: #fadbd8;
    border-radius: 5px;
    display: none;
}

.success-message {
    color: #27ae60;
    margin-top: 10px;
    padding: 10px;
    background-color: #d5f4e6;
    border-radius: 5px;
    display: none;
}

.demo-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #ecf0f1;
    border-radius: 5px;
    font-size: 12px;
    color: #555;
}

.demo-info p {
    margin: 5px 0;
}

/* Navbar */
.navbar {
    background: white;
    color: #243242;
    padding: 8px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 18px rgba(13,183,244,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar-brand {
    display:flex;align-items:center;gap:12px;padding:8px 12px
}

.brand-logo{display:flex;align-items:center;gap:12px}
.logo-mark{width:46px;height:46px;border-radius:0;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;box-shadow:0 6px 18px rgba(13,183,244,0.12);font-size:20px}
.logo-mark--gradient{background: radial-gradient(circle at 25% 25%, #0DB7F4 0%, var(--brand-blue) 35%, var(--brand-orange) 65%, var(--brand-yellow) 100%)}
.brand-text{display:flex;flex-direction:column;line-height:1}
.brand-name{font-size:16px;color:var(--brand-blue);font-weight:800}
.brand-sub{font-size:11px;color:var(--muted);margin-top:2px}

.navbar-menu {
    display: flex;
    gap: 0;
}

.nav-btn {
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.12s, color 0.12s;
}

.nav-btn:hover {
    color: var(--brand-blue);
}

.logout-btn {
    background: #0DB7F4;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
}

.logout-btn:hover {
    background-color: #0A91C7;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.section {
    background: var(--card-bg);
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(36,50,66,0.06);
}

.section h2 {
    color: #243242;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 3px solid rgba(13,183,244,0.08);
}

.section h3 {
    color: #34495e;
    margin-bottom: 15px;
    margin-top: 15px;
}

.section h4 {
    color: #555;
    margin: 15px 0 10px 0;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

.section-divider {
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    margin: 24px 0;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #0DB7F4;
    color: white;
    padding: 22px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(13,183,244,0.12);
}

.stat-card h3 {
    font-size: 32px;
    margin: 0;
    color: white;
}

.stat-card p {
    margin: 10px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    background: var(--brand-blue);
    color: var(--brand-white);
}

.btn-primary,
.btn-secondary,
.btn-accent,
.btn-ghost,
.btn-success,
.btn-danger {
    background: var(--brand-blue);
    color: var(--brand-white);
    border: none;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-accent:hover,
.btn-ghost:hover,
.btn-success:hover,
.btn-danger:hover {
    background: rgba(13,183,244,0.16);
    color: var(--brand-slate-700);
    transform: none;
    box-shadow: none;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table thead {
    background: linear-gradient(90deg, rgba(13,183,244,0.06), rgba(255,138,31,0.03));
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #bdc3c7;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Modals */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal.open {
    display: flex;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-grey-100);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.page-section-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 700px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: black;
}

/* Trainer Profile Modal */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brand-grey-200);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--brand-dark);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--brand-grey-400);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--brand-dark);
}

.modal-body {
    padding: 0;
}

.trainer-info-section,
.pd-submissions-section {
    margin-bottom: 24px;
}

.trainer-info-section h3,
.pd-submissions-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    padding: 12px;
    background-color: var(--brand-grey-50);
    border-radius: 6px;
}

.info-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-grey-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-item > div {
    font-size: 14px;
    color: var(--brand-dark);
    font-weight: 500;
}

/* PD Submission Item */
.pd-submission-item {
    border: 1px solid var(--brand-grey-200);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    background-color: #fafafa;
}

.pd-submission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.pd-submission-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--brand-dark);
}

.pd-submission-date {
    font-size: 12px;
    color: var(--brand-grey-500);
}

.pd-submission-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-submission-status.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.pd-submission-status.approved {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pd-submission-status.rejected {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.pd-submission-description {
    font-size: 13px;
    color: var(--brand-grey-600);
    margin-bottom: 12px;
    line-height: 1.5;
}

.pd-submission-units {
    font-size: 12px;
    color: var(--brand-grey-500);
    margin-bottom: 12px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
}

.pd-submission-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-submission-actions .btn {
    flex: 1;
    min-width: 120px;
    font-size: 12px;
    padding: 8px 12px;
}

/* Clickable Trainer Row */
#trainersTable tbody tr {
    cursor: pointer;
}

#trainersTable tbody tr:hover {
    background-color: var(--brand-grey-50);
}


.filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Evidence List */
.evidence-item {
    background-color: var(--surface);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid var(--brand-blue);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}

.evidence-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(13,183,244,0.06);
}

.evidence-item h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.evidence-item p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.evidence-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Units Display */
.unit-item {
    background-color: #ecf0f1;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.unit-item h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.unit-item p {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .navbar-menu {
        flex-wrap: wrap;
        width: 100%;
    }

    .nav-btn {
        flex: 1;
        padding: 10px;
        font-size: 12px;
    }

    .login-box {
        margin: 20px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        margin: 10px auto;
        padding: 0 10px;
    }

    .section {
        padding: 20px;
    }

    .table-container {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .login-box {
        padding: 20px;
    }

    .login-box h1 {
        font-size: 24px;
    }
}

/* ===== Trainer Portal Redesign - Tab UI ===== */

/* Tab Navigation */
.nav-tab {
    cursor: pointer;
    transition: all 0.12s ease;
}

.nav-tab.active {
    background: var(--brand-grey-100);
    color: var(--brand-grey-900);
    box-shadow: var(--shadow-soft);
}

.nav-tab:hover {
    background: var(--brand-grey-100);
    color: var(--brand-grey-900);
}

/* Tab Panes */
.tab-pane {
    display: none;
    animation: fadeIn 0.2s ease-in;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Unit Details */
.unit-details {
    display: none;
}

.unit-details.expanded {
    display: block;
}

/* PD Evidence Form */
#pdEvidenceForm textarea {
    font-family: inherit;
    resize: vertical;
}

/* File Preview */
#pdFilesPreview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Resume Matrix Table */
#resumeMatrixTable textarea {
    font-family: inherit;
    resize: vertical;
    font-size: 12px;
}

/* PD Mapping Matrix */
#pdMappingMatrix {
    font-size: 12px;
}

#pdMappingMatrix th,
#pdMappingMatrix td {
    padding: 8px 12px;
}

/* Overview dashboard styling */
.dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--brand-grey-200);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.stat-label {
    font-size: 12px;
    color: var(--brand-grey-700);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand-grey-900);
    margin-bottom: 14px;
}

.progress-bar {
    height: 10px;
    background: var(--brand-grey-150);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0DB7F4, #0DB7F4);
    transition: width 0.35s ease;
}

.progress-caption {
    margin-top: 10px;
    font-size: 12px;
    color: var(--brand-grey-700);
}

.compliance-card {
    border-left: 4px solid #0DB7F4;
}

.compliance-status {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.compliance-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.compliance-breakdown div {
    background: var(--brand-grey-100);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compliance-breakdown span {
    font-size: 12px;
    color: var(--brand-grey-700);
}

.compliance-breakdown strong {
    font-size: 18px;
}

.top-dashboard-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.stats.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pd-progress-card {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.pd-bar-charts {
    display: grid;
    gap: 16px;
}

.pd-bar-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: var(--brand-white);
    border: 1px solid var(--brand-grey-200);
    border-radius: 14px;
}

.bar-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--brand-grey-900);
}

.bar-track-vertical {
    width: 100%;
    height: 220px;
    background: var(--brand-grey-150);
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--brand-grey-200);
}

.vertical-bar-fill {
    width: 100%;
    height: 0%;
    background: #0DB7F4;
    transition: height 0.4s ease;
}

.progress-note {
    font-size: 12px;
    color: var(--brand-grey-700);
}

.compliance-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 0;
    font-size: 13px;
}

.compliance-summary strong {
    display: block;
    color: var(--brand-grey-900);
    margin-bottom: 4px;
}

.donut-title {
    font-size: 14px;
    color: var(--brand-grey-900);
    margin-bottom: 12px;
    font-weight: 600;
}

.donut-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
}

.donut-caption {
    font-size: 14px;
    color: var(--brand-grey-700);
}

.compliance-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
    font-size: 13px;
}

.compliance-summary strong {
    display: block;
    color: var(--brand-grey-900);
    margin-bottom: 4px;
}

.file-preview > div {
    background: var(--brand-grey-100);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.file-preview button {
    border: none;
    background: none;
    color: var(--brand-grey-700);
    cursor: pointer;
    font-size: 14px;
}

.dropzone {
    background: var(--brand-grey-100);
    border: 1px dashed var(--brand-grey-300);
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    color: var(--brand-grey-700);
}

.dropzone.drag {
    border-color: #0DB7F4;
    background: rgba(13, 183, 244, 0.08);
}

/* Coverage Chart Container */
#pdCoverageChart {
    display: none;
}

/* Responsive adjustments for new UI */
@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr;
    }

    .card:last-child {
        display: none;
    }
}

@media (max-width: 860px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .compliance-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tab-pane .left {
        min-width: 100%;
    }

    #pdFilesPreview {
        max-height: 200px;
        overflow-y: auto;
    }

    #resumeMatrixTable {
        font-size: 11px;
    }

    #resumeMatrixTable th,
    #resumeMatrixTable td {
        padding: 6px 8px;
    }

    #pdMappingMatrix th {
        max-width: 80px;
        word-break: break-word;
        font-size: 11px;
    }
}