@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root{
    --green:#0f5f52;
    --green-dark:#0b4b42;
    --green2:#16806f;
    --gold:#d4af45;
    --bg:#f3f8f7;
    --surface:#ffffff;
    --text:#142033;
    --muted:#667085;
    --border:#dde8e5;
    --danger:#b91c1c;
    --success:#047857;
    --shadow:0 16px 45px rgba(15,79,70,.08);
    --sidebar-width:280px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    font-family:'Tajawal', Tahoma, Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
    direction:rtl;
    overflow-x:hidden;
}
a{text-decoration:none;color:inherit}
img{max-width:100%}

/* =========================
   Admin Layout - stable flex
   ========================= */
.app-body .app-shell{
    min-height:100vh;
    display:flex;
    flex-direction:row;
    align-items:stretch;
    width:100%;
    max-width:100%;
}

.sidebar{
    width:var(--sidebar-width);
    flex:0 0 var(--sidebar-width);
    min-height:100vh;
    background:linear-gradient(180deg,var(--green),var(--green-dark));
    color:#fff;
    padding:28px 22px;
    position:sticky;
    top:0;
    align-self:flex-start;
    height:100vh;
    overflow:auto;
    z-index:20;
}

.main-area{
    flex:1 1 auto;
    min-width:0;
    width:auto;
    min-height:100vh;
    background:var(--bg);
}

.brand{
    display:flex;
    align-items:center;
    gap:14px;
    padding-bottom:24px;
    border-bottom:1px solid rgba(255,255,255,.16);
}
.brand-icon{
    width:64px;
    height:64px;
    border-radius:22px;
    background:var(--gold);
    color:#132033;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    flex:0 0 auto;
}
.brand strong{
    display:block;
    font-size:22px;
    color:#fff;
}
.brand span{
    display:block;
    color:rgba(255,255,255,.75);
    font-size:14px;
    margin-top:2px;
}
.side-nav{
    margin-top:28px;
    display:flex;
    flex-direction:column;
    gap:12px;
}
.side-nav a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:15px 18px;
    border-radius:18px;
    color:#fff;
    font-weight:900;
}
.side-nav a:hover,
.side-nav a.active{
    background:rgba(255,255,255,.14);
}
.side-nav span{
    color:var(--gold);
    font-weight:900;
}
.sidebar-footer{
    margin-top:260px;
    border-top:1px solid rgba(255,255,255,.16);
    padding-top:20px;
}
.user-mini{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
}
.avatar{
    width:46px;
    height:46px;
    border-radius:16px;
    background:rgba(255,255,255,.14);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    flex:0 0 auto;
}
.user-mini b{display:block;color:#fff}
.user-mini small{display:block;color:rgba(255,255,255,.75)}
.logout-link{
    display:block;
    text-align:center;
    padding:13px 16px;
    border-radius:16px;
    background:rgba(255,255,255,.14);
    color:#fff;
    font-weight:900;
}
.topbar-v2{
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:26px 34px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.topbar-v2 h1{
    margin:0;
    font-size:30px;
    color:var(--text);
}
.topbar-v2 p{
    margin:6px 0 0;
    color:var(--muted);
}
.top-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.menu-toggle{
    display:none;
    border:0;
    background:#eef7f5;
    color:var(--green);
    border-radius:14px;
    width:46px;
    height:46px;
    font-size:22px;
    font-weight:900;
    cursor:pointer;
}
.content{
    width:100%;
    max-width:1240px;
    margin:0 auto;
    padding:26px;
}
.footer-v2{
    text-align:center;
    color:var(--muted);
    padding:24px;
}

/* =========================
   Common Components
   ========================= */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:0;
    border-radius:15px;
    padding:12px 18px;
    font-family:inherit;
    font-weight:900;
    cursor:pointer;
    line-height:1.2;
}
.btn-primary{
    background:linear-gradient(135deg,var(--green),var(--green2));
    color:#fff;
}
.btn-outline{
    background:#fff;
    color:var(--green);
    border:1px solid #9ad6cb;
}
.btn-light{
    background:#f8fafc;
    color:var(--green);
    border:1px solid var(--border);
}
.btn-danger{
    background:#fee2e2;
    color:#991b1b;
}
.btn-sm{
    padding:8px 12px;
    font-size:14px;
    border-radius:12px;
}
.full{width:100%}
.alert{
    padding:14px 16px;
    border-radius:16px;
    margin:14px 0;
    font-weight:800;
}
.alert-danger{background:#fee2e2;color:#991b1b}
.alert-success{background:#dcfce7;color:#166534}
.panel{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    margin-bottom:20px;
    box-shadow:var(--shadow);
}
.panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}
.panel-head h3,.panel h3{margin:0;color:var(--text)}
.panel-head p,.panel p{color:var(--muted)}
.empty,.empty-state{
    text-align:center;
    color:var(--muted);
    padding:34px;
}
.empty-state{
    background:#fff;
    border:1px dashed var(--border);
    border-radius:24px;
}
.empty-state strong{display:block;color:var(--text);margin-bottom:8px}
input,textarea,select{
    width:100%;
    border:1px solid var(--border);
    border-radius:15px;
    padding:13px 15px;
    font-family:inherit;
    font-size:16px;
    background:#fff;
    color:var(--text);
}
input:focus,textarea:focus,select:focus{
    outline:3px solid rgba(22,128,111,.13);
    border-color:var(--green2);
}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{
    padding:13px;
    border-bottom:1px solid var(--border);
    text-align:right;
    vertical-align:top;
}
th{background:#f8fafc;color:var(--green);font-weight:900}
.actions{display:flex;gap:10px;flex-wrap:wrap}

/* =========================
   Dashboard
   ========================= */
.hero-card,.page-hero{
    background:#fff;
    border:1px solid var(--border);
    border-top:6px solid var(--gold);
    border-radius:28px;
    padding:28px 32px;
    box-shadow:var(--shadow);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:24px;
}
.hero-card h2,.page-hero h2{
    margin:0 0 8px;
    font-size:34px;
    color:var(--text);
}
.hero-card p,.page-hero p{
    margin:0;
    color:var(--muted);
}
.eyebrow{
    display:inline-block;
    color:var(--green2);
    font-weight:900;
    margin-bottom:6px;
}
.hero-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    margin-bottom:24px;
}
.stat-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:24px;
    box-shadow:var(--shadow);
    border-left:6px solid var(--gold);
}
.stat-card span{
    display:block;
    color:var(--muted);
    font-weight:800;
}
.stat-card strong{
    display:block;
    font-size:44px;
    color:var(--green);
    margin-top:8px;
}
.grid-two{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
}
.list-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px;
    border:1px solid var(--border);
    border-radius:18px;
    margin-bottom:12px;
    background:#fbfdfc;
}
.list-row strong{display:block;font-size:18px;color:var(--text)}
.list-row small{display:block;color:var(--muted);margin-top:5px}

/* =========================
   Forms Page
   ========================= */
.toolbar-form{
    display:flex;
    gap:10px;
    margin-bottom:18px;
}
.forms-grid-pro{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}
.form-card-pro{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    box-shadow:var(--shadow);
}
.form-card-top,.mini-stats,.share-row,.card-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.form-card-top{justify-content:space-between}
.form-card-pro h3{margin:16px 0 8px;font-size:22px}
.form-card-pro p{margin:0 0 14px;color:var(--muted)}
.status-badge,.badge{
    padding:6px 11px;
    border-radius:999px;
    font-size:13px;
    font-weight:900;
}
.status-badge.active,.badge.ok{background:#dcfce7;color:#166534}
.status-badge.off,.badge.off{background:#fee2e2;color:#991b1b}
.mini-stats span{
    background:#f8fafc;
    border:1px solid var(--border);
    padding:7px 11px;
    border-radius:12px;
    color:var(--green);
    font-weight:800;
}
.share-row{margin:14px 0}
.share-row input{flex:1;min-width:200px}
.card-actions{margin-top:10px}

/* =========================
   Builder
   ========================= */
.builder-layout{
    display:grid;
    grid-template-columns:390px minmax(0,1fr);
    gap:22px;
    align-items:start;
}
.builder-sidebar{
    position:sticky;
    top:20px;
}
.builder-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    box-shadow:var(--shadow);
}
.builder-box h3{margin:0 0 16px;color:var(--text)}
.builder-form label{
    display:block;
    margin:14px 0 7px;
    font-weight:900;
}
.check-row{
    display:flex!important;
    align-items:center;
    gap:10px;
    background:#f8fafc;
    border:1px solid var(--border);
    padding:12px 14px;
    border-radius:14px;
}
.check-row input{width:auto}
.options-editor{
    background:#f8fafc;
    border:1px dashed #cbd5e1;
    padding:14px;
    border-radius:18px;
    margin:14px 0;
}
.options-editor small{
    display:block;
    color:var(--muted);
    margin-top:8px;
}
.is-hidden{display:none!important}
.section-head{
    background:#fff;
    border:1px solid var(--border);
    border-radius:22px;
    padding:18px 22px;
    margin-bottom:16px;
    box-shadow:var(--shadow);
}
.section-head h3{margin:0;font-size:24px}
.section-head p{margin:6px 0 0;color:var(--muted)}
.question-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    margin-bottom:16px;
    box-shadow:var(--shadow);
}
.question-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}
.question-meta{
    display:flex;
    align-items:flex-start;
    gap:14px;
    flex:1;
    min-width:0;
}
.question-order{
    width:44px;
    height:44px;
    min-width:44px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--green),var(--green2));
    color:#fff;
    font-weight:900;
}
.question-card h4{
    margin:0 0 10px;
    font-size:21px;
    line-height:1.7;
}
.question-tags{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.question-tags span{
    display:inline-flex;
    align-items:center;
    padding:5px 11px;
    border-radius:999px;
    background:#eef7f5;
    color:var(--green);
    border:1px solid #cae6df;
    font-size:13px;
    font-weight:900;
}
.question-tags .required-tag{
    background:#fff1f2;
    color:#be123c;
    border-color:#fecdd3;
}
.question-tags .optional-tag{
    background:#f8fafc;
    color:#64748b;
    border-color:#e2e8f0;
}
.question-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.icon-btn{
    width:38px;
    height:38px;
    border-radius:13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#f8fafc;
    border:1px solid var(--border);
    color:var(--green);
    font-weight:900;
}
.icon-btn.danger{
    background:#fff1f2;
    color:#b91c1c;
    border-color:#fecaca;
}
.question-preview{
    margin-top:16px;
    padding:16px;
    background:#f8fafc;
    border:1px solid #edf2f7;
    border-radius:18px;
}
.preview-options{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.preview-options span{
    color:#334155;
    font-weight:800;
}
.fake-input{
    color:#94a3b8;
    border-bottom:2px dotted #cbd5e1;
    padding-bottom:10px;
}
.edit-question-box{
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid var(--border);
}
.edit-question-box summary{
    cursor:pointer;
    color:var(--green2);
    font-weight:900;
    padding:8px 0;
}
.compact-form{margin-top:12px}

/* =========================
   Login + Public Form
   ========================= */
.login-body,.public-body{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:
        radial-gradient(circle at top right,rgba(212,175,69,.22),transparent 32%),
        linear-gradient(135deg,#eef7f5,#f9fafb);
}
.login-card,.public-card{
    width:100%;
    max-width:680px;
    background:#fff;
    border-radius:30px;
    padding:34px;
    box-shadow:0 24px 70px rgba(15,79,70,.13);
    border-top:7px solid var(--gold);
}
.public-card.pro-form-card{max-width:760px}
.brand-badge{
    width:76px;
    height:76px;
    border-radius:24px;
    background:linear-gradient(135deg,var(--green),var(--green2));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.small-badge{
    width:62px;
    height:62px;
    border-radius:20px;
}
.public-form-header{
    display:flex;
    gap:16px;
    align-items:center;
    margin-bottom:22px;
}
.public-form-header h1,.login-card h1{
    margin:0 0 8px;
    font-size:34px;
    color:var(--green-dark);
}
.public-form-header p,.login-card p{
    margin:0;
    color:var(--muted);
}
.public-question.pro-question,.public-question{
    border:1px solid var(--border);
    border-radius:22px;
    padding:20px;
    margin:18px 0;
    background:#fff;
}
.question-head{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-bottom:14px;
}
.question-number{
    width:34px;
    height:34px;
    min-width:34px;
    border-radius:12px;
    background:#eef7f5;
    color:var(--green);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.question-title{
    font-weight:900;
    font-size:18px;
    line-height:1.7;
}
.question-title b,.public-question b{color:var(--danger)}
.options-box{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:10px;
}
.option-card{
    display:flex;
    align-items:center;
    gap:12px;
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px 16px;
    background:#fff;
    cursor:pointer;
    font-weight:800;
}
.option-card:hover{
    border-color:#9ad6cb;
    background:#f4fbf9;
}
.option-card input{
    width:18px;
    height:18px;
    margin:0;
}
.empty-options{
    color:#991b1b;
    background:#fee2e2;
    padding:12px;
    border-radius:14px;
    font-weight:800;
}
.submit-public-btn{
    margin-top:10px;
    padding:15px;
}
.success-panel{
    text-align:center;
    padding:34px;
}
.success-icon{
    width:70px;
    height:70px;
    border-radius:24px;
    margin:0 auto 14px;
    background:#dcfce7;
    color:#166534;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:34px;
    font-weight:900;
}

/* Legacy compatibility */
.nav{display:none}
.hero{
    background:#fff;
    border-radius:24px;
    padding:28px;
    border-right:7px solid var(--gold);
    box-shadow:var(--shadow);
}
.cards{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
    margin:22px 0;
}
.card{
    background:#fff;
    border-radius:22px;
    padding:24px;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
}
.card span{color:var(--muted);display:block}
.card strong{
    font-size:38px;
    color:var(--green);
    display:block;
    margin-top:8px;
}
.form-panel label{
    display:block;
    margin:14px 0 7px;
    font-weight:900;
}
.question-item{
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px;
    margin-bottom:12px;
    background:#fff;
}
.question-item strong{display:block}
.question-item small{
    display:block;
    color:var(--muted);
    margin-top:6px;
}
.delete{
    color:var(--danger);
    display:inline-block;
    margin-top:8px;
}

/* Responsive */
@media(max-width:1100px){
    .app-body .app-shell{
        display:block;
    }
    .sidebar{
        position:fixed;
        right:0;
        top:0;
        bottom:0;
        height:100vh;
        transform:translateX(105%);
        transition:.25s ease;
        box-shadow:0 30px 80px rgba(0,0,0,.25);
    }
    body.sidebar-open .sidebar{
        transform:translateX(0);
    }
    .main-area{
        width:100%;
    }
    .menu-toggle{
        display:inline-flex;
        align-items:center;
        justify-content:center;
    }
    .top-actions{display:none}
    .sidebar-footer{margin-top:80px}
    .builder-layout,.grid-two,.forms-grid-pro{
        grid-template-columns:1fr;
    }
    .builder-sidebar{position:static}
    .stats-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:700px){
    .topbar-v2,.hero-card,.page-hero,.panel-head,.question-card-head{
        display:block;
    }
    .topbar-v2{padding:18px}
    .topbar-v2 h1{font-size:24px}
    .menu-toggle{margin-bottom:12px}
    .content{padding:18px}
    .stats-grid,.cards{grid-template-columns:1fr}
    .toolbar-form{display:block}
    .toolbar-form .btn{
        margin-top:8px;
        width:100%;
    }
    .public-form-header{display:block}
    .brand-badge{margin-bottom:14px}
}

/* ===== Responses Page ===== */
.responses-cards{
    display:flex;
    flex-direction:column;
    gap:16px;
}
.response-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:22px;
    padding:18px;
    box-shadow:0 10px 28px rgba(15,79,70,.05);
}
.response-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding-bottom:14px;
    border-bottom:1px solid var(--border);
    margin-bottom:14px;
}
.response-card-head strong{
    display:block;
    font-size:19px;
    color:var(--text);
}
.response-card-head small{
    display:block;
    margin-top:4px;
    color:var(--muted);
}
.response-answers-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.answer-item{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:16px;
    padding:13px 14px;
}
.answer-item span{
    display:block;
    color:var(--muted);
    font-weight:800;
    margin-bottom:6px;
}
.answer-item b{
    display:block;
    color:var(--text);
    font-weight:900;
    line-height:1.7;
}
@media(max-width:800px){
    .response-answers-grid{
        grid-template-columns:1fr;
    }
}
.btn-danger{
    background:#dc3545;
    color:#fff;
    border:none;
}

.btn-danger:hover{
    background:#bb2d3b;
}
/* ===== Forms Page Small Enhancements ===== */
.btn-success{
    background:#16a34a;
    color:#fff;
    border:none;
}
.btn-success:hover{
    background:#15803d;
}
.mini-stats span{
    margin-bottom:4px;
}
/* ===== Form Stats Page ===== */
.stats-overview .stat-date{
    font-size:18px;
    line-height:1.6;
}
.stats-question-list,
.text-answer-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}
.stats-question-card,
.text-answer-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:22px;
    padding:18px;
    box-shadow:0 10px 28px rgba(15,79,70,.05);
}
.stats-question-head{
    padding-bottom:14px;
    margin-bottom:14px;
    border-bottom:1px solid var(--border);
}
.stats-question-head h4,
.text-answer-card h4{
    margin:0 0 6px;
    color:var(--text);
    font-size:20px;
}
.stats-question-head small{
    color:var(--muted);
}
.choice-stats{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.choice-stat-row{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:16px;
    padding:13px;
}
.choice-stat-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:8px;
}
.choice-stat-top span{
    font-weight:900;
    color:var(--text);
}
.choice-stat-top b{
    color:var(--green);
}
.choice-bar{
    width:100%;
    height:10px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
}
.choice-bar div{
    height:100%;
    background:linear-gradient(135deg,var(--green),var(--green2));
    border-radius:999px;
}
.text-answer-card ul{
    margin:8px 0 0;
    padding-right:18px;
}
.text-answer-card li{
    margin-bottom:8px;
    color:var(--text);
}
.muted{
    color:var(--muted);
}
/* ===== QR Code Page ===== */
.btn-qr{
    background:#7c3aed;
    color:#fff;
    border:none;
}
.btn-qr:hover{
    background:#6d28d9;
}
.qr-panel{
    max-width:980px;
}
.qr-box{
    display:grid;
    grid-template-columns:360px minmax(0,1fr);
    gap:28px;
    align-items:center;
}
.qr-preview{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:26px;
    padding:22px;
    text-align:center;
}
.qr-preview img{
    width:100%;
    max-width:320px;
    height:auto;
    background:#fff;
    border-radius:18px;
}
.qr-info h3{
    margin:0 0 8px;
    font-size:26px;
    color:var(--text);
}
.qr-info p{
    color:var(--muted);
    margin-bottom:18px;
}
.qr-info label{
    display:block;
    font-weight:900;
    margin-bottom:8px;
}
.qr-actions{
    margin-top:16px;
}
.qr-note{
    display:block;
    margin-top:14px;
    color:var(--muted);
}
@media(max-width:900px){
    .qr-box{
        grid-template-columns:1fr;
    }
}
@media print{
    .sidebar,
    .topbar-v2,
    .hero-actions,
    .qr-actions,
    .footer-v2{
        display:none!important;
    }
    .main-area{
        width:100%!important;
    }
    .content{
        max-width:100%!important;
    }
    .qr-box{
        display:block;
        text-align:center;
    }
}
/* ===== Inline POST Action Forms ===== */
.inline-action-form{
    display:inline-flex;
    margin:0;
}
.inline-action-form button{
    font-family:inherit;
}
/* ===== Owner Labels ===== */
.owner-inline{
    display:inline-block;
    margin-right:6px;
    color:var(--muted);
    font-size:13px;
    font-weight:800;
    vertical-align:middle;
}
.alert-info{
    background:#eff6ff;
    color:#1e3a8a;
    border:1px solid #bfdbfe;
    border-radius:14px;
    padding:12px 14px;
    margin-bottom:16px;
}
.alert-info a{
    color:#1d4ed8;
    font-weight:900;
    text-decoration:none;
}
/* ===== Users Page V2 ===== */
.users-filter select{
    min-height:44px;
}
.users-table .user-cell{
    display:flex;
    align-items:center;
    gap:12px;
}
.user-avatar{
    width:42px;
    height:42px;
    border-radius:15px;
    background:#eef7f5;
    color:var(--green);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.user-cell strong{
    display:block;
    color:var(--text);
}
.user-cell small{
    display:block;
    color:var(--muted);
    margin-top:3px;
}
.current-user-label{
    color:var(--green)!important;
    font-weight:900;
}
.user-actions{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}
.inline-action-form{
    display:inline-flex;
    margin:0;
}
.inline-action-form button{
    font-family:inherit;
}
.inline-action-form button:disabled{
    opacity:.45;
    cursor:not-allowed;
}
@media(max-width:900px){
    .users-table-wrap{
        overflow-x:auto;
    }
}
/* ===== Profile Page ===== */
.profile-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
}
.profile-panel:first-child{
    grid-row:span 2;
}
.profile-summary{
    display:flex;
    align-items:center;
    gap:16px;
    padding:16px;
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:22px;
    margin-bottom:16px;
}
.profile-avatar-big{
    width:72px;
    height:72px;
    border-radius:24px;
    background:#eef7f5;
    color:var(--green);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    font-size:32px;
}
.profile-summary h3{
    margin:0 0 5px;
    color:var(--text);
}
.profile-summary p{
    margin:0;
    color:var(--muted);
}
.profile-info-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.profile-info-list div{
    display:flex;
    justify-content:space-between;
    gap:12px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    padding:13px 14px;
}
.profile-info-list span{
    color:var(--muted);
    font-weight:800;
}
.profile-info-list strong{
    color:var(--text);
}
@media(max-width:900px){
    .profile-grid{
        grid-template-columns:1fr;
    }
    .profile-panel:first-child{
        grid-row:auto;
    }
}

/* ===== Permissions Help Box ===== */
.permission-help{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px 16px;
    color:var(--muted);
    line-height:1.9;
}
.permission-help strong{
    color:var(--text);
}
.permission-help ul{
    margin:8px 0 0;
    padding-right:20px;
}
.permission-help li{
    margin:4px 0;
}
/* ===== V3 Notifications + Admin Dashboard ===== */
.nav-badge{
    min-width:22px;
    height:22px;
    padding:0 7px;
    border-radius:999px;
    background:#d8ad3d;
    color:#073f36;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:900;
    margin-right:auto;
}
.notifications-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.notification-item{
    display:flex;
    gap:14px;
    padding:16px;
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
}
.notification-item.unread{
    background:#f5fbf9;
    border-color:#b7ded6;
}
.notification-icon{
    width:42px;
    height:42px;
    border-radius:15px;
    background:#eef7f5;
    color:var(--green);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.notification-title{
    display:flex;
    align-items:center;
    gap:10px;
}
.notification-content p{
    margin:6px 0;
    color:var(--muted);
    line-height:1.8;
}
.notification-content small{
    color:var(--muted);
}
.admin-insights-panel{
    margin-bottom:22px;
}
.admin-insights-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:14px;
}
.insight-card{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:18px;
    padding:16px;
}
.insight-card span{
    display:block;
    color:var(--muted);
    font-weight:800;
    margin-bottom:8px;
}
.insight-card strong{
    display:block;
    color:var(--text);
    font-size:22px;
}
.insight-card small{
    display:block;
    color:var(--muted);
    margin-top:6px;
}
@media(max-width:1100px){
    .admin-insights-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:650px){
    .admin-insights-grid{
        grid-template-columns:1fr;
    }
}


/* ===== Dashboard Final Cleanup ===== */
.dashboard-welcome{background:#fff;border:1px solid var(--border);border-top:5px solid var(--gold);border-radius:26px;padding:24px 28px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}
.dashboard-welcome h2{margin:4px 0 6px;font-size:30px;color:var(--text)}
.dashboard-welcome p{margin:0;color:var(--muted)}
.dashboard-stats{margin-bottom:22px}
.dashboard-stats .stat-card{min-height:132px;display:flex;flex-direction:column;justify-content:space-between}
.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.dashboard-panel{padding:22px;min-height:auto!important}
.compact-head{margin-bottom:14px}
.dashboard-row.compact-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:16px 18px;margin-bottom:12px;border:1px solid var(--border);border-radius:18px;background:#fbfdfc;min-height:auto!important}
.compact-row .row-content{flex:1;min-width:0}
.compact-row .row-content strong{display:block;font-size:19px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compact-row .row-content small{display:block;margin-top:5px;color:#64748b}
.compact-row .row-actions{display:flex;gap:8px;flex-shrink:0;flex-wrap:wrap}
@media(max-width:900px){.dashboard-welcome,.dashboard-grid{display:block}.dashboard-welcome .btn{margin-top:14px}.dashboard-row.compact-row{display:block}.compact-row .row-actions{margin-top:10px}}
