*{margin:0;padding:0;box-sizing:border-box}
body{font-family:Inter,Arial,sans-serif;background:#020817;color:#fff}
a{text-decoration:none;color:inherit}
button{font-family:inherit}

.dashboard-layout{display:flex;min-height:100vh;background:radial-gradient(circle at 45% 0%,rgba(37,99,235,.16),transparent 34%),#020817}

/* Sidebar */
.sidebar{width:285px;position:fixed;left:0;top:0;bottom:0;background:linear-gradient(180deg,#071226,#07101f);border-right:1px solid rgba(255,255,255,.08);padding:28px 18px;display:flex;flex-direction:column;z-index:30}
.brand{display:flex;gap:14px;align-items:center;margin-bottom:34px}
.brand-icon{width:54px;height:54px;border-radius:15px;background:linear-gradient(135deg,#ff4b4b,#b91535);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:28px;box-shadow:0 18px 40px rgba(255,45,75,.45)}
.brand h2{font-size:20px;line-height:1}
.brand p{color:#9aa8bd;font-size:13px;margin-top:6px}
.nav-menu{display:flex;flex-direction:column;gap:9px}
.nav-menu a{padding:14px 16px;border-radius:12px;color:#dbe7ff;font-weight:700;font-size:15px;display:flex;align-items:center;gap:13px;transition:.25s ease}
.nav-menu a:hover,.nav-menu a.active{background:linear-gradient(135deg,#ff405f,#c71346);box-shadow:0 14px 35px rgba(255,64,95,.28)}
.sidebar-footer{margin-top:auto;font-size:12px;color:#91a0b6;line-height:1.7}

/* Main */
.main-content{margin-left:285px;width:calc(100% - 285px)}
.topbar{min-height:104px;padding:24px 36px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.07);background:rgba(5,12,27,.76);backdrop-filter:blur(18px);position:sticky;top:0;z-index:20}
.topbar h1{font-size:34px;letter-spacing:-1px}
.topbar p{color:#b3bfd0;margin-top:8px}
.topbar p strong{color:#ff3158}
.topbar-actions{display:flex;align-items:center;gap:16px}
.search-box{width:390px;height:54px;border-radius:18px;background:#071426;border:1px solid rgba(255,255,255,.1);color:#aab7ca;display:flex;align-items:center;padding:0 20px}
.top-icon{width:45px;height:45px;border-radius:14px;background:#071426;display:flex;align-items:center;justify-content:center;position:relative;border:1px solid rgba(255,255,255,.08);color:#dbe7ff}
.top-icon span{position:absolute;top:-7px;right:-7px;background:#ef244b;border-radius:999px;font-size:11px;padding:4px 7px;color:#fff}
.profile{display:flex;align-items:center;gap:12px}
.avatar{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,#fff,#94a3b8);color:#111827;display:flex;align-items:center;justify-content:center;font-weight:900}
.profile p{font-size:12px;margin:2px 0 0;color:#9aa8bd}
.page-content{padding:28px 36px 40px}

/* KPI */
.kpi-row{display:grid;grid-template-columns:repeat(5,1fr);gap:22px;margin-bottom:22px}
.kpi-card{min-height:140px;border-radius:18px;padding:22px;background:linear-gradient(145deg,#0b172d,#071020);border:1px solid rgba(255,255,255,.1);position:relative;overflow:hidden}
.kpi-card:before{content:"";position:absolute;right:-40px;top:-40px;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.045)}
.kpi-main{display:flex;gap:18px;align-items:flex-start;position:relative;z-index:2}
.kpi-card span{color:#dbe7ff;font-weight:800}
.kpi-card h2{font-size:40px;margin:12px 0 7px;letter-spacing:-1px}
.kpi-card p{font-size:13px;color:#9fb0c7}
.kpi-icon{width:62px;height:62px;border-radius:14px;display:flex;align-items:center;justify-content:center;flex:0 0 62px;color:#fff}
.red .kpi-icon{background:linear-gradient(135deg,#ff405f,#c71346)}
.amber .kpi-icon{background:linear-gradient(135deg,#f59e0b,#ea580c)}
.green .kpi-icon{background:linear-gradient(135deg,#22c55e,#059669)}
.purple .kpi-icon{background:linear-gradient(135deg,#8b5cf6,#6d28d9)}
.blue .kpi-icon{background:linear-gradient(135deg,#2563eb,#0284c7)}
.success-text{color:#22c55e!important}.warning-text{color:#f59e0b!important}.purple-text{color:#c084fc!important}.blue-text{color:#38bdf8!important}
.sparkline{height:28px;margin-top:10px;border-radius:999px;opacity:.55;background:linear-gradient(90deg,transparent,currentColor,transparent)}
.red-line{color:#ff405f}.amber-line{color:#f59e0b}.green-line{color:#22c55e}.purple-line{color:#8b5cf6}.blue-line{color:#2563eb}

/* Grid */
.dashboard-grid{
    display:grid;
    grid-template-columns:1.45fr 1.05fr .95fr;
    grid-template-areas:
        "chart donut activity"
        "latest calendar quick";
    gap:22px;
    align-items:stretch;
}
.panel{background:linear-gradient(145deg,rgba(10,24,46,.94),rgba(5,13,27,.98));border:1px solid rgba(255,255,255,.1);border-radius:18px;padding:24px;box-shadow:0 30px 80px rgba(0,0,0,.22)}
.panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.panel-header h3,.panel h3{font-size:20px}
.panel-header a{color:#ff405f;font-weight:800}
.soft-btn{background:#0c1b33;border:1px solid rgba(255,255,255,.1);color:#fff;padding:10px 15px;border-radius:10px}
.chart-panel{
    grid-area:chart;
    min-height:330px;
}

.donut-panel{
    grid-area:donut;
    min-height:330px;
}

.activity-panel{
    grid-area:activity;
    min-height:330px;
}

.latest-panel{
    grid-area:latest;
    min-height:360px;
}

.calendar-panel{
    grid-area:calendar;
    min-height:360px;
}

.quick-panel{
    grid-area:quick;
    min-height:360px;
}

/* Chart */
.chart-panel{min-height:330px}
.chart-legend{display:flex;gap:22px;flex-wrap:wrap;margin:18px 0;color:#c8d5e8;font-size:13px}
.legend{display:inline-block;width:11px;height:11px;border-radius:999px;margin-right:8px}
.legend.submitted{background:#1685ff}.legend.approved{background:#22c55e}.legend.changes{background:#8b5cf6}.legend.production{background:#f97316}.legend.expired{background:#ef244b}.legend.completed{background:#22d3ee}
.line-chart{height:250px;background:linear-gradient(180deg,rgba(255,255,255,.025),transparent);border-radius:14px;overflow:hidden}
.line-chart svg{width:100%;height:100%}
.line-chart line{stroke:rgba(255,255,255,.06);stroke-width:1}
.chart-line{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.submitted-line{stroke:#1685ff}.approved-line{stroke:#22c55e}.changes-line{stroke:#8b5cf6}.production-line{stroke:#f97316}

/* Donut */
.donut-panel{min-height:330px}
.donut-layout{display:flex;gap:30px;align-items:center;margin-top:26px}
.donut-chart{width:210px;height:210px;border-radius:50%;background:conic-gradient(#1685ff 0 25%,#22c55e 25% 50%,#8b5cf6 50% 63%,#f97316 63% 76%,#ef244b 76% 88%,#22d3ee 88% 100%);display:flex;align-items:center;justify-content:center;flex:0 0 210px}
.donut-chart>div{width:112px;height:112px;background:#071426;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column}
.donut-chart strong{font-size:36px}.donut-chart span{color:#9fb0c7}
.donut-list{width:100%}
.donut-list p{display:flex;justify-content:space-between;gap:20px;color:#dbe7ff;padding:10px 0}
.donut-list b{font-weight:800;color:#fff}

/* Activity */
.activity-item{display:flex;align-items:center;gap:14px;padding:15px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.activity-icon{width:42px;height:42px;border-radius:10px;background:linear-gradient(135deg,#ef4444,#be123c);display:flex;align-items:center;justify-content:center;color:#fff;flex:0 0 42px}
.activity-item p{color:#9fb0c7;margin-top:4px;font-size:13px}
.activity-item span{margin-left:auto;color:#9fb0c7;font-size:12px}

/* Latest */
.proof-table{width:100%;border-collapse:collapse}
.proof-table th{color:#9fb0c7;text-align:left;font-size:13px;padding:14px}
.proof-table td{padding:15px 14px;border-top:1px solid rgba(255,255,255,.06)}
.status-badge{padding:8px 13px;border-radius:999px;font-size:12px;font-weight:900;display:inline-block}
.status-badge.approved{background:rgba(34,197,94,.18);color:#6ee7b7}
.status-badge.sent,.status-badge.viewed{background:rgba(245,158,11,.18);color:#fbbf24}
.status-badge.changes-requested{background:rgba(239,68,68,.2);color:#fca5a5}
.status-badge.in-production{background:rgba(37,99,235,.2);color:#93c5fd}
.status-badge.expired{background:rgba(148,163,184,.18);color:#cbd5e1}
.status-badge.completed{background:rgba(20,184,166,.18);color:#5eead4}
.circle-action{width:34px;height:34px;border-radius:50%;border:0;background:#13233f;color:#fff;margin-right:6px;display:inline-flex;align-items:center;justify-content:center}

/* Calendar */
.calendar-panel{min-height:330px}
.calendar-title{text-align:center;font-weight:900;margin:16px 0}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;text-align:center}
.calendar-grid b{color:#9fb0c7;font-size:12px;font-weight:700}
.calendar-grid span{padding:8px;border-radius:999px;color:#dbe7ff;font-size:13px}
.active-day{background:#ef244b!important;color:#fff!important}
.deadline-list{margin-top:20px}
.deadline-list p{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid rgba(255,255,255,.06);font-size:14px}
.deadline-list b{color:#f59e0b}

/* Quick */
.quick-panel{display:flex;flex-direction:column;gap:13px}
.quick-panel h3{margin-bottom:4px}
.quick-btn{height:58px;border-radius:12px;color:#fff;font-weight:900;display:flex;align-items:center;gap:12px;padding:0 22px}
.red-btn{background:linear-gradient(135deg,#ef4444,#be123c)}
.purple-btn{background:linear-gradient(135deg,#a855f7,#6d28d9)}
.orange-btn {background: linear-gradient(135deg, #f7ba55, #d99428);}
.blue-btn{background:linear-gradient(135deg,#0ea5e9,#1d4ed8)}
.green-btn{background:linear-gradient(135deg,#22c55e,#0f766e)}
.dark-btn{background:#13233f}

/* CSS Icons */
.nav-icon,.icon-doc,.icon-clock,.icon-check,.icon-refresh,.icon-production,.icon-home,.icon-users,.icon-layers,.icon-chart,.icon-list,.icon-settings,.icon-logout,.icon-eye,.icon-more,.icon-plus,.icon-upload{position:relative;display:inline-block;width:22px;height:22px;color:currentColor}
.icon-doc:before{content:"";position:absolute;inset:2px 4px;border:2px solid currentColor;border-radius:3px}
.icon-doc:after{content:"";position:absolute;left:8px;right:8px;top:8px;border-top:2px solid currentColor;box-shadow:0 5px 0 currentColor}
.icon-clock:before{content:"";position:absolute;inset:2px;border:2px solid currentColor;border-radius:50%}
.icon-clock:after{content:"";position:absolute;width:7px;height:7px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;left:10px;top:6px}
.icon-check:before{content:"";position:absolute;width:15px;height:8px;border-left:3px solid currentColor;border-bottom:3px solid currentColor;transform:rotate(-45deg);left:4px;top:5px}
.icon-refresh:before{content:"";position:absolute;inset:4px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%}
.icon-production:before,.icon-settings:before{content:"";position:absolute;inset:4px;border:3px solid currentColor;border-radius:50%}
.icon-home:before{content:"";position:absolute;left:3px;top:8px;width:16px;height:11px;border:2px solid currentColor;border-top:0}
.icon-home:after{content:"";position:absolute;left:5px;top:2px;width:12px;height:12px;border-left:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg)}
.icon-users:before{content:"";position:absolute;left:7px;top:2px;width:8px;height:8px;border:2px solid currentColor;border-radius:50%}
.icon-users:after{content:"";position:absolute;left:3px;bottom:2px;width:16px;height:8px;border:2px solid currentColor;border-radius:10px 10px 3px 3px}
.icon-layers:before{content:"";position:absolute;left:3px;top:4px;width:16px;height:10px;border:2px solid currentColor;transform:skewY(-12deg)}
.icon-chart:before{content:"";position:absolute;left:3px;bottom:3px;width:3px;height:9px;background:currentColor;box-shadow:6px -5px 0 currentColor,12px -2px 0 currentColor}
.icon-list:before{content:"";position:absolute;left:4px;top:5px;width:14px;height:2px;background:currentColor;box-shadow:0 6px 0 currentColor,0 12px 0 currentColor}
.icon-logout:before{content:"";position:absolute;left:3px;top:4px;width:11px;height:14px;border:2px solid currentColor;border-right:0}
.icon-logout:after{content:"";position:absolute;right:2px;top:10px;width:12px;height:2px;background:currentColor;box-shadow:4px -4px 0 -1px currentColor,4px 4px 0 -1px currentColor}
.icon-eye:before{content:"";position:absolute;left:2px;top:6px;width:18px;height:10px;border:2px solid currentColor;border-radius:50%}
.icon-eye:after{content:"";position:absolute;left:8px;top:9px;width:6px;height:6px;background:currentColor;border-radius:50%}
.icon-more:before{content:"";position:absolute;left:4px;top:10px;width:4px;height:4px;background:currentColor;border-radius:50%;box-shadow:7px 0 0 currentColor,14px 0 0 currentColor}
.icon-plus:before{content:"";position:absolute;left:10px;top:3px;width:2px;height:16px;background:currentColor}
.icon-plus:after{content:"";position:absolute;left:3px;top:10px;width:16px;height:2px;background:currentColor}
.icon-upload:before{content:"";position:absolute;left:5px;bottom:3px;width:12px;height:7px;border:2px solid currentColor;border-top:0}
.icon-upload:after{content:"";position:absolute;left:10px;top:3px;width:2px;height:12px;background:currentColor;box-shadow:-4px 4px 0 -1px currentColor,4px 4px 0 -1px currentColor}

/* Responsive */
@media(max-width:1500px){
    .kpi-row{grid-template-columns:repeat(3,1fr)}
    .dashboard-grid{
        grid-template-columns:1fr;
        grid-template-areas:
            "chart"
            "donut"
            "activity"
            "latest"
            "calendar"
            "quick";
    }
}
@media(max-width:900px){
    .sidebar{display:none}
    .main-content{margin-left:0;width:100%}
    .topbar{height:auto;flex-direction:column;gap:20px}
    .topbar-actions{flex-wrap:wrap;width:100%}
    .search-box{width:100%}
    .kpi-row{grid-template-columns:1fr}
    .page-content{padding:20px}
    .donut-layout{flex-direction:column;align-items:flex-start}
    .proof-table{font-size:12px}
}

.page-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:24px;
}

.page-toolbar h2{
    font-size:30px;
    letter-spacing:-.8px;
}

.page-toolbar p{
    color:#9fb0c7;
    margin-top:7px;
}

.toolbar-btn{
    height:52px;
    padding:0 22px;
    border-radius:13px;
    background:linear-gradient(135deg,#ef4444,#be123c);
    color:#fff;
    font-weight:900;
    display:flex;
    align-items:center;
    gap:10px;
}

.table-search{
    min-width:230px;
    height:42px;
    border-radius:12px;
    background:#071426;
    border:1px solid rgba(255,255,255,.1);
    color:#9fb0c7;
    display:flex;
    align-items:center;
    padding:0 16px;
    font-size:13px;
}

.dark-toolbar-btn{
    background:#13233f;
}

.form-panel{
    max-width:100%;
}

.admin-form{
    width:100%;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:22px;
}

.form-field{
    display:flex;
    flex-direction:column;
    gap:9px;
}

.form-field label{
    color:#dbe7ff;
    font-weight:800;
    font-size:14px;
}

.form-field input,
.form-field select,
.form-field textarea{
    height:52px;
    border-radius:13px;
    border:1px solid rgba(255,255,255,.1);
    background:#071426;
    color:#fff;
    padding:0 16px;
    outline:none;
}

.form-field textarea{
    height:120px;
    padding:16px;
    resize:vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{
    border-color:#ef4444;
    box-shadow:0 0 0 4px rgba(239,68,68,.12);
}

.form-actions{
    margin-top:28px;
    display:flex;
    justify-content:flex-end;
}

.submit-btn{
    height:54px;
    padding:0 28px;
    border:0;
    border-radius:13px;
    background:linear-gradient(135deg,#ef4444,#be123c);
    color:#fff;
    font-weight:900;
    cursor:pointer;
}

@media(max-width:900px){
    .form-grid{
        grid-template-columns:1fr;
    }
}

/* CLIENT PROFILE PAGE FIX */
.client-profile-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
}

.client-profile-grid > div{
    background:rgba(7,20,38,.58);
    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;
    padding:18px;
    min-height:92px;
}

.client-profile-grid strong{
    display:block;
    color:#9fb0c7;
    font-size:13px;
    margin-bottom:10px;
}

.client-profile-grid p{
    color:#ffffff;
    font-size:15px;
    font-weight:700;
}

.panel + .panel{
    margin-top:22px;
}

@media(max-width:1200px){
    .client-profile-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:700px){
    .client-profile-grid{
        grid-template-columns:1fr;
    }
}

.proof-detail-grid{
    display:grid;
    grid-template-columns:2fr .85fr;
    gap:22px;
    align-items:start;
}

.proof-main-panel{
    min-height:500px;
}

.detail-section{
    margin-top:26px;
    padding-top:24px;
    border-top:1px solid rgba(255,255,255,.08);
}

.detail-section h4{
    font-size:16px;
    margin-bottom:16px;
    color:#fff;
}

.detail-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
}

.detail-grid > div{
    background:rgba(7,20,38,.58);
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    padding:16px;
}

.detail-grid strong{
    display:block;
    color:#9fb0c7;
    font-size:12px;
    margin-bottom:8px;
}

.detail-grid p{
    color:#fff;
    font-weight:800;
    font-size:14px;
    line-height:1.5;
}

.notes-box{
    background:rgba(7,20,38,.58);
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    padding:18px;
    min-height:100px;
    color:#dbe7ff;
    line-height:1.7;
}

.proof-side-column{
    display:flex;
    flex-direction:column;
    gap:22px;
}

.side-actions{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:18px;
}

@media(max-width:1300px){
    .proof-detail-grid{
        grid-template-columns:1fr;
    }

    .detail-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:700px){
    .detail-grid{
        grid-template-columns:1fr;
    }
}

.link-success-panel{
    margin-bottom:22px;
    border-color:rgba(34,197,94,.28);
    background:
        radial-gradient(circle at top right,rgba(34,197,94,.12),transparent 35%),
        linear-gradient(145deg,rgba(10,24,46,.94),rgba(5,13,27,.98));
}

.link-success-panel h3{
    margin-bottom:8px;
}

.link-success-panel p{
    color:#9fb0c7;
    margin-bottom:18px;
}

.approval-link-box{
    display:flex;
    gap:12px;
}

.approval-link-box input{
    flex:1;
    height:52px;
    border-radius:13px;
    border:1px solid rgba(255,255,255,.1);
    background:#071426;
    color:#dbe7ff;
    padding:0 16px;
}

.approval-link-box button{
    height:52px;
    border:0;
    border-radius:13px;
    padding:0 22px;
    background:linear-gradient(135deg,#22c55e,#0f766e);
    color:#fff;
    font-weight:900;
    cursor:pointer;
}

/* ==========================================
   TOPBAR NOTIFICATIONS
========================================== */

.topbar-right{
    display:flex;
    align-items:center;
    gap:16px;
}

.notification-wrapper{
    position:relative;
}

.notification-btn{
    width:46px;
    height:46px;
    border:none;
    border-radius:12px;
    background:rgba(255,255,255,.08);
    color:#ffffff;
    cursor:pointer;
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.25s ease;
}

.notification-btn:hover{
    background:rgba(255,255,255,.14);
}

.notification-btn i{
    font-size:20px;
}

.notification-badge{
    position:absolute;
    top:-6px;
    right:-6px;
    min-width:22px;
    height:22px;
    border-radius:50%;
    background:#ef4444;
    color:#ffffff;
    font-size:11px;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #071426;
}

.notification-dropdown{
    position:absolute;
    top:60px;
    right:0;
    width:420px;
    background:#ffffff;
    border-radius:18px;
    box-shadow:0 25px 60px rgba(0,0,0,.25);
    overflow:hidden;
    display:none;
    z-index:9999;
}

.notification-dropdown.active{
    display:block;
}

.notification-header{
    padding:18px 20px;
    background:#f8fafc;
    border-bottom:1px solid #e5e7eb;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.notification-header strong{
    font-size:15px;
    color:#111827;
}

.notification-header span{
    font-size:12px;
    color:#64748b;
}

.notification-list{
    max-height:500px;
    overflow-y:auto;
}

.notification-item{
    display:block;
    text-decoration:none;
    padding:16px 20px;
    border-bottom:1px solid #f1f5f9;
    transition:.2s ease;
    color:#111827;
}

.notification-item:hover{
    background:#f8fafc;
}

.notification-item.unread{
    background:#fff5f5;
}

.notification-title{
    font-size:14px;
    font-weight:800;
    color:#111827;
    margin-bottom:6px;
}

.notification-message{
    font-size:13px;
    color:#64748b;
    line-height:1.5;
    margin-bottom:8px;
}

.notification-time{
    font-size:11px;
    color:#94a3b8;
}

.notification-empty{
    padding:30px;
    text-align:center;
    color:#94a3b8;
    font-size:14px;
}
