:root {
    --bg: #07101f;
    --bg-soft: #0b1628;
    --card: rgba(17, 29, 49, .94);
    --card-soft: #14233a;
    --card-hover: #1a2d49;
    --border: #263b58;
    --text: #edf4ff;
    --muted: #8ea4c0;
    --primary: #5b8cff;
    --primary-strong: #386eea;
    --cyan: #28d4c5;
    --green: #38d996;
    --orange: #ffb454;
    --red: #ff6b7a;
    --shadow: 0 24px 70px rgba(0, 0, 0, .25);
    --font-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
    --font-mono: "Fira Code", "Vazirmatn", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 5% 0%, rgba(56, 110, 234, .18), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(40, 212, 197, .08), transparent 30rem),
        var(--bg);
    font-family: var(--font-body);
    line-height: 1.7;
    transition: background .4s ease;
}

.mono, .stat-number, code, kbd {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
}

/* ===================== Per-discipline distinct page backdrop tint ===================== */
/* Base dark theme stays the same; only the ambient color wash behind each discipline's
   کارتابل changes, so every discipline feels visually distinct while remaining dark-mode. */
body.theme-me {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, #ff8a4c 26%, transparent), transparent 34rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, #ff6a2c 14%, transparent), transparent 30rem),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, #7a2e07 20%, transparent), transparent 40rem),
        #100b08;
    --card: color-mix(in srgb, #ff8a4c 6%, rgba(20, 15, 12, .94));
    --card-soft: color-mix(in srgb, #ff8a4c 9%, #1c1611);
    --card-hover: color-mix(in srgb, #ff8a4c 14%, #241a13);
    --border: color-mix(in srgb, #ff8a4c 24%, #3a2b20);
}
body.theme-el {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, #ffd23f 22%, transparent), transparent 34rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, #f5b301 12%, transparent), transparent 30rem),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, #7a5a02 18%, transparent), transparent 40rem),
        var(--bg);
}
body.theme-pi {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, #38d9c9 24%, transparent), transparent 34rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, #12b3a3 14%, transparent), transparent 30rem),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, #0a6a61 20%, transparent), transparent 40rem),
        #030f0e;
    --card: color-mix(in srgb, #38d9c9 6%, rgba(20, 15, 12, .94));
    --card-soft: color-mix(in srgb, #38d9c9 9%, #0e211f);
    --card-hover: color-mix(in srgb, #38d9c9 14%, #122a27);
    --border: color-mix(in srgb, #38d9c9 24%, #1e4844);
}
body.theme-in {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, #8b5cf6 26%, transparent), transparent 34rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, #6d28d9 14%, transparent), transparent 30rem),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, #3c1a6e 22%, transparent), transparent 40rem),
        #0b0616;
    --card: color-mix(in srgb, #8b5cf6 6%, rgba(20, 15, 12, .94));
    --card-soft: color-mix(in srgb, #8b5cf6 9%, #1e1638);
    --card-hover: color-mix(in srgb, #8b5cf6 14%, #261d45);
    --border: color-mix(in srgb, #8b5cf6 24%, #40316e);
}
body.theme-dc {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, #28d4c5 24%, transparent), transparent 34rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, #0fa89b 14%, transparent), transparent 30rem),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, #0a5a52 20%, transparent), transparent 40rem),
        #030f0d;
    --card: color-mix(in srgb, #28d4c5 6%, rgba(20, 15, 12, .94));
    --card-soft: color-mix(in srgb, #28d4c5 9%, #0e2320);
    --card-hover: color-mix(in srgb, #28d4c5 14%, #122c28);
    --border: color-mix(in srgb, #28d4c5 24%, #1e4a44);
}
body.theme-cv {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, #7a8f4a 24%, transparent), transparent 34rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, #5a6b32 14%, transparent), transparent 30rem),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, #33401c 20%, transparent), transparent 40rem),
        #0a0e05;
    --card: color-mix(in srgb, #7a8f4a 6%, rgba(20, 15, 12, .94));
    --card-soft: color-mix(in srgb, #7a8f4a 9%, #1d2413);
    --card-hover: color-mix(in srgb, #7a8f4a 14%, #252e17);
    --border: color-mix(in srgb, #7a8f4a 24%, #3f4d24);
}
body.theme-et {
    background:
        radial-gradient(circle at 5% 0%, color-mix(in srgb, #5b8cff 20%, transparent), transparent 32rem),
        radial-gradient(circle at 90% 12%, color-mix(in srgb, #386eea 12%, transparent), transparent 30rem),
        var(--bg);
    --card: color-mix(in srgb, #5b8cff 6%, rgba(17, 29, 49, .94));
    --border: color-mix(in srgb, #5b8cff 20%, #263b58);
}
body.theme-mg {
    background:
        radial-gradient(circle at 5% 0%, color-mix(in srgb, #94a3b8 16%, transparent), transparent 32rem),
        radial-gradient(circle at 90% 12%, color-mix(in srgb, #64748b 10%, transparent), transparent 30rem),
        var(--bg);
    --card: color-mix(in srgb, #94a3b8 6%, rgba(17, 22, 29, .94));
    --card-soft: color-mix(in srgb, #94a3b8 8%, #161c24);
    --card-hover: color-mix(in srgb, #94a3b8 12%, #1d242e);
    --border: color-mix(in srgb, #94a3b8 20%, #303a48);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.main-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 78px;
    border-bottom: 1px solid rgba(142, 164, 192, .16);
    background: rgba(7, 16, 31, .86);
    backdrop-filter: blur(18px);
}
.header-container, .page-container {
    width: min(94%, 1480px);
    margin: 0 auto;
}
.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo, .avatar, .large-avatar, .profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dce8ff;
    background: linear-gradient(135deg, var(--primary-strong), #28b7c7);
    box-shadow: 0 8px 25px rgba(56, 110, 234, .27);
}
.brand-logo { width: 45px; height: 45px; border-radius: 14px; font-size: 19px; }
.brand-info { display: flex; flex-direction: column; gap: 1px; }
.brand-info strong { font-size: 14px; }
.brand-info small, .user-summary small { color: var(--muted); font-size: 10px; }
.user-area { position: relative; }
.profile-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    color: var(--text);
    border: 0;
    background: transparent;
    cursor: pointer;
}
.avatar { width: 39px; height: 39px; border-radius: 12px; font-weight: 700; }
.user-summary { display: flex; flex-direction: column; text-align: right; line-height: 1.45; }
.user-summary strong { font-size: 11px; }
.menu-toggle-icon { color: var(--muted); margin-right: 3px; }
.user-menu {
    position: absolute;
    display: none;
    top: 56px;
    left: 0;
    width: 315px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.user-menu.show { display: block; animation: menu-in .16s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
.user-menu-header { display: flex; gap: 12px; align-items: center; padding: 17px; background: linear-gradient(135deg, #172f57, #12233d); }
.large-avatar { width: 47px; height: 47px; border-radius: 14px; font-size: 18px; }
.user-menu-header strong, .user-menu-header small { display: block; }
.user-menu-header strong { font-size: 12px; }
.user-menu-header small { margin-top: 4px; color: #b6c8e1; font-size: 10px; }
.user-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.user-details div { min-width: 0; }
.user-details span, .user-details strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-details span { color: var(--muted); font-size: 9px; }
.user-details strong { margin-top: 2px; font-size: 10px; }
.menu-links { padding: 8px; }
.menu-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #d5e1f2;
    border: 0;
    border-radius: 9px;
    background: transparent;
    text-align: right;
    font-size: 11px;
    cursor: pointer;
}
.menu-link i { width: 17px; color: var(--muted); text-align: center; }
.menu-link:hover { color: white; background: var(--card-hover); }
.menu-link-highlight { color: #b8d1ff; background: rgba(91, 140, 255, .1); }
.logout-link { color: #ff9ca7; }
.logout-link i { color: var(--red); }
.menu-divider { height: 1px; margin: 6px 0; background: var(--border); }

.main-content { min-height: calc(100vh - 142px); padding: 32px 0 58px; }
.main-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    min-height: 64px;
    padding: 17px 4%;
    color: var(--muted);
    border-top: 1px solid rgba(142, 164, 192, .12);
    background: #050b16;
    font-size: 10px;
}
.main-footer i { color: var(--cyan); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading h1, .page-heading h2 { margin: 0; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.5px; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
}
.card { border-top: 3px solid color-mix(in srgb, var(--accent, #5b8cff) 55%, var(--border)); }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border: 0;
    border-radius: 10px;
    font-size: 11px;
    cursor: pointer;
    transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--accent, var(--primary)), var(--accent-strong, var(--primary-strong))); }
.btn-muted { color: #ccdaed; background: var(--card-soft); }
.btn-danger { color: white; background: linear-gradient(135deg, #d74b61, #9d2944); }
.btn-outline { color: #cfe0ff; border: 1px solid var(--border); background: transparent; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 19px;
    border: 1px solid color-mix(in srgb, var(--accent, var(--border)) 30%, var(--border));
    border-radius: 17px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent, #5b8cff) 16%, transparent), transparent 65%),
        linear-gradient(145deg, rgba(20, 35, 58, .96), rgba(13, 24, 42, .96));
}
.stat-card::after { position: absolute; content: ""; width: 85px; height: 85px; left: -25px; bottom: -35px; border-radius: 50%; background: color-mix(in srgb, var(--accent, #5b8cff) 22%, transparent); }
.stat-card span { display: block; color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin-top: 3px; color: #fff; font-size: 25px; line-height: 1.3; }
.stat-card .stat-icon { margin-bottom: 7px; color: var(--accent, var(--cyan)); font-size: 18px; }
.stat-card.green .stat-icon { color: var(--green); }
.stat-card.orange .stat-icon { color: var(--orange); }
.stat-card.red .stat-icon { color: var(--red); }
.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 205px;
    margin-bottom: 20px;
    padding: 30px;
    border: 1px solid color-mix(in srgb, var(--accent, #2b4e7b) 35%, #2b4e7b);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 15%, color-mix(in srgb, var(--accent, #28d4c5) 22%, transparent), transparent 17rem),
        radial-gradient(circle at 95% 100%, color-mix(in srgb, var(--accent-strong, #1a4f8f) 16%, transparent), transparent 20rem),
        linear-gradient(135deg, #132c51, #0d192d 70%);
}
.welcome-label, .section-label { color: var(--accent, var(--cyan)); font-size: 10px; font-weight: 700; letter-spacing: .2px; }
.welcome-card h2 { margin: 8px 0 8px; font-size: clamp(22px, 4vw, 34px); }
.welcome-card p { max-width: 700px; margin: 0; color: #b8cbe4; font-size: 12px; }
.welcome-icon { color: var(--accent, #8eb3ff); font-size: 70px; opacity: .9; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent, #8eb3ff) 55%, transparent)); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); gap: 20px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 15px; }
.section-header h2 { margin: 4px 0 0; font-size: 17px; }
.section-badge, .status-badge, .position-badge, .revision-badge, .project-code, .hours-value {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 7px;
    white-space: nowrap;
}
.section-badge { color: #cbe0ff; border: 1px solid color-mix(in srgb, var(--accent, #2c4d7d) 40%, #2c4d7d); background: color-mix(in srgb, var(--accent, #5b8cff) 14%, transparent); font-size: 10px; }
.news-list { display: grid; gap: 12px; }
.news-card {
    padding: 17px;
    border: 1px solid color-mix(in srgb, var(--accent, var(--border)) 22%, var(--border));
    border-radius: 15px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent, #5b8cff) 9%, transparent), transparent 70%),
        var(--card);
}
.news-card:hover { border-color: color-mix(in srgb, var(--accent, #3b5e8d) 55%, #3b5e8d); background: var(--card-hover); }
.news-card-top, .news-card-footer { display: flex; justify-content: space-between; gap: 10px; }
.news-type { color: var(--accent, var(--muted)); font-size: 9px; }
.important-badge { font-size: 9px; }
.important-badge { color: #ffca8a; }
.news-card h3 { margin: 10px 0 5px; font-size: 13px; }
.news-card p { margin: 0; color: #b1c1d7; font-size: 11px; line-height: 2; }
.news-card-footer { margin-top: 13px; color: var(--muted); font-size: 9px; }
.quick-actions {
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--accent, var(--border)) 25%, var(--border));
    border-radius: 20px;
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent, #5b8cff) 12%, transparent), transparent 60%),
        rgba(17, 29, 49, .7);
}
.action-card { display: flex; align-items: center; gap: 11px; margin-top: 10px; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: var(--card-soft); }
.action-card:hover { border-color: color-mix(in srgb, var(--accent, #39577c) 55%, #39577c); background: var(--card-hover); }
.action-icon { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 10px; font-size: 15px; }
.blue-icon { color: color-mix(in srgb, var(--accent, #a9c4ff) 75%, white); background: color-mix(in srgb, var(--accent, #5b8cff) 20%, transparent); }
.green-icon { color: #9af1cc; background: rgba(56, 217, 150, .14); }
.red-icon { color: #ffadb7; background: rgba(255, 107, 122, .14); }
.action-card strong, .action-card span { display: block; }
.action-card strong { font-size: 11px; }
.action-card span { color: var(--muted); font-size: 9px; }
.action-card b { margin-right: auto; color: var(--muted); }

.month-nav { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 18px; }
.month-nav strong { min-width: 110px; color: #d7e5fb; text-align: center; font-size: 13px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading span { color: var(--muted); font-size: 10px; }
.table-card { margin-bottom: 20px; padding: 18px; }
.table-search-box { position: relative; margin-bottom: 12px; }
.table-search-box i { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.table-search-input { width: 100%; padding: 10px 42px 10px 16px; border-radius: 10px; border: 1px solid rgba(142, 164, 192, .2); background: rgba(15, 23, 42, .5); color: var(--text); font-size: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
.table-search-input::placeholder { color: var(--muted); }
.table-search-input:focus { outline: none; border-color: var(--accent, #5b8cff); box-shadow: 0 0 0 3px rgba(91, 140, 255, .18); }
.table-search-empty { text-align: center; padding: 16px; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid rgba(142, 164, 192, .12); border-radius: 13px; }
.works-table { width: 100%; min-width: 1520px; border-collapse: collapse; }
.works-table th {
    padding: 12px 9px;
    color: #b9cae0;
    border-bottom: 1px solid var(--border);
    background: #0c182b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.works-table td { max-width: 150px; padding: 11px 9px; color: #d4dfef; border-bottom: 1px solid rgba(142, 164, 192, .12); text-align: center; font-size: 10px; vertical-align: middle; }
.works-table tr:last-child td { border-bottom: 0; }
.works-table tbody tr:hover { background: rgba(91, 140, 255, .07); }
.description-cell, .compact-cell { max-width: 220px !important; }
.description-tooltip, .compact-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.description-tooltip { position: relative; }
/* Note: hover tooltip is rendered via JS (static/tooltip.js) as a body-level
   floating element so it is never clipped by the horizontally-scrolling
   .table-wrap container (overflow-x:auto forces overflow-y to auto too,
   which used to clip the old ::after popup). */
.js-floating-tooltip {
    position: fixed;
    z-index: 900;
    display: none;
    max-width: min(420px, 80vw);
    padding: 10px 14px;
    color: #eef5ff;
    border: 1px solid #41618b;
    border-radius: 10px;
    background: #14253f;
    box-shadow: 0 15px 35px rgba(0,0,0,.45);
    white-space: normal;
    text-align: right;
    line-height: 1.9;
    font-size: 13px;
    pointer-events: none;
}
.js-floating-tooltip.show { display: block; }
.project-code { color: #c4d8ff; background: rgba(91, 140, 255, .12); font-size: 10px; }
.revision-badge { color: #d5c8ff; background: rgba(153, 117, 255, .13); font-size: 10px; }
.position-badge { color: #c2d5ec; background: rgba(142, 164, 192, .12); font-size: 9px; }
.hours-value { color: #b9f6db; background: rgba(56, 217, 150, .11); font-weight: 700; }
.hours-value small { margin-right: 4px; color: #8ccbad; font-size: 8px; font-weight: 400; }
.status-badge { color: #ffd59d; background: rgba(255, 180, 84, .12); font-size: 9px; }
.actions-cell { white-space: nowrap; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; margin: 0 2px; border-radius: 8px; }
.icon-btn.edit { color: #a8c3ff; background: rgba(91, 140, 255, .16); }
.icon-btn.delete { color: #ffacb5; background: rgba(255, 107, 122, .14); }
.empty-table { padding: 25px !important; color: var(--muted) !important; }

.form-page, .narrow-page, .profile-page { width: min(94%, 960px); margin: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 16px; }
.full-width { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group label { color: #cfddf0; font-size: 11px; font-weight: 700; }
.form-group label b { margin-right: 4px; color: var(--red); }
.form-control { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--text); border: 1px solid var(--border); border-radius: 10px; outline: 0; background: #0b1729; font-size: 11px; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 140, 255, .12); }
textarea.form-control { min-height: 92px; resize: vertical; }
.field-error { display: block; color: #ff8d99; font-size: 10px; }
.helptext, .help-text { color: var(--muted); font-size: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 26px; border: 1px solid #2c4f7d; border-radius: 20px; background: linear-gradient(135deg, #15335d, #122039); }
.profile-avatar { width: 68px; height: 68px; border-radius: 18px; font-size: 24px; }
.profile-header h1 { margin: 5px 0; font-size: 24px; }
.profile-header p { margin: 0; color: #a9c4e6; font-size: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.info-grid div { padding: 13px; border: 1px solid rgba(142, 164, 192, .10); border-radius: 11px; background: var(--card-soft); }
.info-grid span, .info-grid strong { display: block; }
.info-grid span { color: var(--muted); font-size: 9px; }
.info-grid strong { margin-top: 4px; font-size: 11px; }
.message { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 11px 14px; border: 1px solid transparent; border-radius: 11px; font-size: 11px; }
.message-success { color: #b7f5d7; border-color: rgba(56, 217, 150, .25); background: rgba(56, 217, 150, .10); }
.message-error { color: #ffc0c7; border-color: rgba(255, 107, 122, .25); background: rgba(255, 107, 122, .10); }
.message-warning { color: #ffdbac; border-color: rgba(255, 180, 84, .25); background: rgba(255, 180, 84, .10); }
.message-info { color: #c0d6ff; border-color: rgba(91, 140, 255, .25); background: rgba(91, 140, 255, .10); }
.messages-container { margin-bottom: -14px; }
.danger-card { text-align: center; }
.big-danger { color: var(--red); font-size: 45px; }
.delete-preview { margin: 18px 0; padding: 15px; border-radius: 11px; background: var(--card-soft); line-height: 2; }
.empty-state { padding: 28px; color: var(--muted); text-align: center; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 25px; }
.login-wrapper { display: grid; grid-template-columns: .9fr 1.1fr; width: min(100%, 930px); overflow: hidden; border: 1px solid var(--border); border-radius: 25px; background: var(--card); box-shadow: var(--shadow); }
.login-intro { padding: 48px; background: radial-gradient(circle at 20% 15%, rgba(40, 212, 197, .20), transparent 18rem), linear-gradient(145deg, #0b1930, #183b70); }
.login-intro h1 { margin: 25px 0 10px; font-size: 25px; line-height: 1.6; }
.login-intro p { color: #c2d5ef; font-size: 12px; line-height: 2; }
.login-features { display: flex; flex-direction: column; gap: 13px; margin-top: 28px; color: #e1edff; font-size: 11px; }
.login-features i { width: 20px; color: var(--cyan); }
.login-form { padding: 48px; }
.login-form h2 { margin: 0 0 18px; font-size: 21px; }
.login-form label { display: block; margin: 13px 0 6px; color: #c9d8eb; font-size: 11px; }
.login-form .remember { display: flex; align-items: center; gap: 7px; }
.login-form .remember input { accent-color: var(--primary); }
.login-button { width: 100%; margin-top: 18px; padding: 13px; color: white; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-strong)); cursor: pointer; font-size: 12px; }
.captcha-box { margin-top: 16px; overflow: hidden; border-radius: 8px; }
.captcha-box { max-width: 100%; overflow-x: auto; }
.custom-captcha-box { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; max-width: 100%; }
.custom-captcha-box img { border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: #10161f; display: block; max-width: 100%; height: auto; }
#captcha-refresh { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #cfe0ff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
#captcha-refresh:hover { background: rgba(255,255,255,.14); transform: rotate(90deg); }
.captcha-input { letter-spacing: 3px; font-weight: 600; }
.errorlist { margin: 5px 0; padding: 0; color: #ff8d99; list-style: none; font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 20px; }
.dashboard-panel h2 { margin: 0 0 15px; font-size: 16px; }
.discipline-block { margin-bottom: 16px; }
.discipline-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--border); color: #d5e5fb; font-size: 12px; }
.personnel-list { display: grid; gap: 8px; }
.personnel-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: var(--card-soft); }
.personnel-card:hover, .personnel-card.selected { border-color: var(--primary); background: rgba(91, 140, 255, .12); }
.personnel-card strong, .personnel-card small { display: block; }
.personnel-card strong { font-size: 11px; }
.personnel-card small { color: var(--muted); font-size: 9px; }
.personnel-metrics { text-align: left; }
.personnel-metrics b { display: block; color: #b9f6db; font-size: 12px; }
.personnel-metrics span { color: var(--muted); font-size: 9px; }
.progress { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #20324c; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--primary)); }
.selected-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.selected-header h2 { margin: 0; font-size: 16px; }
.mini-note { color: var(--muted); font-size: 10px; }
.chart-card { min-height: 300px; }

@media (max-width: 1050px) {
    .works-table { min-width: 1350px; }
    .content-grid, .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
    .brand-info, .user-summary { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid, .info-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: auto; }
    .login-wrapper { grid-template-columns: 1fr; }
    .login-intro { display: none; }
    .main-footer { flex-direction: column; }
}
@media (max-width: 520px) {
    .main-content { padding-top: 22px; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .welcome-card { align-items: flex-start; padding: 22px; }
    .welcome-icon { display: none; }
    .stats-grid { gap: 9px; }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 21px; }
    .user-menu { position: fixed; top: 70px; left: 3%; right: 3%; width: auto; }
    .login-form { padding: 30px 22px; }
}
@media (max-width: 400px) {
    .header-container { gap: 8px; }
    .brand-logo { width: 38px; height: 38px; font-size: 16px; }
    .avatar { width: 34px; height: 34px; }
    .page-heading h1, .page-heading h2 { font-size: 19px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
    .stat-card { padding: 11px; }
    .stat-card strong { font-size: 17px; }
    .card { padding: 16px; }
    .login-form { padding: 24px 16px; }
    .discipline-hero-body { max-width: 100%; }
    .discipline-hero-art { width: 150px; height: 128px; }
    .org-branches { flex-direction: column; align-items: center; }
    .welcome-card h2 { font-size: 20px; }
    .quick-actions, .news-card { padding: 14px; }
    .user-menu { top: 62px; }
}

/* ===================== Industrial backdrop ===================== */
.industrial-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.16;
}
.rig-shape {
    position: absolute;
    filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.25));
}
.rig-tank {
    bottom: -40px;
    width: 220px;
    height: 260px;
    border-radius: 50% 50% 8px 8px / 30% 30% 8px 8px;
    border: 3px solid rgba(148, 163, 184, 0.5);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0));
}
.rig-tank.t1 { left: 4%; }
.rig-tank.t2 { left: 18%; width: 160px; height: 190px; opacity: 0.8; }
.rig-pipe {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.55), transparent);
}
.rig-pipe.p1 { top: 22%; left: 0; width: 55%; }
.rig-pipe.p2 { top: 60%; right: 0; width: 40%; }
.rig-flare {
    right: 6%;
    bottom: -10px;
    width: 6px;
    height: 320px;
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.6), rgba(148, 163, 184, 0.4));
    border-radius: 4px;
}
.rig-flare::before {
    content: "";
    position: absolute;
    top: -26px;
    left: -12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.9), rgba(251, 146, 60, 0.1) 70%);
    filter: blur(1px);
}
.rig-tower {
    right: 14%;
    bottom: 0;
    width: 90px;
    height: 380px;
    background:
        repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.5) 0 2px, transparent 2px 22px),
        repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.35) 0 2px, transparent 2px 40px);
    clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
}

/* ===================== Per-discipline backdrop motifs =====================
   Every discipline gets its own set of large silhouette shapes drawn purely
   in CSS (no image/SVG assets needed). Shapes are hidden by default and only
   revealed for the matching body.theme-XX so each discipline's workspace
   feels visually distinct at a glance, not just recolored. */
.rig-valve, .rig-flange, .rig-drum, .rig-exchanger, .rig-cable, .rig-bolt,
.rig-transformer, .rig-gauge, .rig-transmitter, .rig-folder, .rig-wrench, .rig-shield,
.rig-foundation, .rig-ladder {
    display: none;
}

/* --- Piping (pi): pipe runs, valves, flanges --- */
body.theme-pi .rig-valve, body.theme-pi .rig-flange { display: block; }
.rig-valve {
    top: 30%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 6px solid rgba(56, 217, 201, 0.55);
}
.rig-valve::before, .rig-valve::after {
    content: "";
    position: absolute;
    background: rgba(56, 217, 201, 0.45);
}
.rig-valve::before { top: -18px; left: 50%; width: 4px; height: 18px; transform: translateX(-50%); }
.rig-valve::after { top: -26px; left: 50%; width: 26px; height: 4px; transform: translateX(-50%); }
.rig-valve.v1 { left: 30%; top: 18%; }
.rig-valve.v2 { right: 22%; top: 46%; width: 34px; height: 34px; border-width: 4px; }
.rig-flange {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px dashed rgba(56, 217, 201, 0.4);
}
.rig-flange::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 2px solid rgba(56, 217, 201, 0.3);
}
.rig-flange.f1 { left: 8%; top: 55%; }
.rig-flange.f2 { right: 6%; top: 12%; width: 40px; height: 40px; }

/* --- Mechanical (me): drums, heat exchangers, pumps --- */
body.theme-me .rig-drum, body.theme-me .rig-exchanger, body.theme-me .rig-wrench { display: block; }
.rig-drum {
    width: 130px;
    height: 320px;
    border-radius: 60px;
    border: 3px solid rgba(255, 138, 76, 0.45);
    background: linear-gradient(180deg, rgba(255, 138, 76, 0.08), transparent);
}
.rig-drum.d1 { left: 10%; bottom: -30px; }
.rig-exchanger {
    right: 10%;
    top: 20%;
    width: 200px;
    height: 90px;
    border-radius: 45px;
    border: 3px solid rgba(255, 138, 76, 0.4);
    background: repeating-linear-gradient(90deg, rgba(255, 138, 76, 0.35) 0 2px, transparent 2px 14px);
}
.rig-wrench {
    right: 20%;
    bottom: 10%;
    width: 90px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 138, 76, 0.35);
    transform: rotate(38deg);
}
.rig-wrench::before, .rig-wrench::after {
    content: "";
    position: absolute;
    top: -9px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 10px solid rgba(255, 138, 76, 0.35);
}
.rig-wrench::before { left: -14px; }
.rig-wrench::after { right: -14px; }

/* --- Electrical (el): cabling, bolts, transformers --- */
body.theme-el .rig-cable, body.theme-el .rig-transformer, body.theme-el .rig-bolt { display: block; }
.rig-cable {
    height: 4px;
    background: repeating-linear-gradient(90deg, rgba(255, 210, 63, 0.55) 0 10px, transparent 10px 20px);
}
.rig-cable.c1 { top: 16%; left: -2%; width: 60%; transform: rotate(4deg); }
.rig-cable.c2 { bottom: 24%; right: -2%; width: 45%; transform: rotate(-6deg); }
.rig-transformer {
    right: 8%;
    bottom: 6%;
    width: 150px;
    height: 120px;
    border-radius: 12px;
    border: 3px solid rgba(255, 210, 63, 0.45);
    background: repeating-linear-gradient(0deg, rgba(255, 210, 63, 0.25) 0 3px, transparent 3px 16px);
}
.rig-bolt {
    left: 6%;
    top: 10%;
    width: 4px;
    height: 90px;
    background: linear-gradient(180deg, rgba(255, 210, 63, 0.7), transparent);
}
.rig-bolt::before {
    content: "\26A1";
    position: absolute;
    top: -6px;
    left: -10px;
    font-size: 26px;
    color: rgba(255, 210, 63, 0.55);
}

/* --- Instrumentation (in): gauges, transmitters --- */
body.theme-in .rig-gauge, body.theme-in .rig-transmitter { display: block; }
.rig-gauge {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 5px solid rgba(139, 92, 246, 0.45);
}
.rig-gauge::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 26px;
    background: rgba(139, 92, 246, 0.6);
    transform-origin: bottom;
    transform: translate(-50%, -100%) rotate(35deg);
}
.rig-gauge.g1 { left: 14%; top: 24%; }
.rig-gauge.g2 { right: 16%; bottom: 20%; width: 46px; height: 46px; border-width: 3px; }
.rig-transmitter {
    left: 24%;
    bottom: 8%;
    width: 54px;
    height: 78px;
    border-radius: 10px;
    border: 3px solid rgba(139, 92, 246, 0.4);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.15), transparent);
}

/* --- Document control (dc): folders, files --- */
body.theme-dc .rig-folder { display: block; }
.rig-folder {
    width: 90px;
    height: 66px;
    border-radius: 6px 10px 10px 10px;
    border: 3px solid rgba(40, 212, 197, 0.4);
}
.rig-folder::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    width: 44px;
    height: 14px;
    border-radius: 6px 6px 0 0;
    background: rgba(40, 212, 197, 0.3);
}
.rig-folder.fo1 { left: 12%; top: 18%; }
.rig-folder.fo2 { right: 12%; bottom: 16%; width: 70px; height: 52px; }

/* --- Civil & Structure (cv): concrete foundation + monkey ladder --- */
body.theme-cv .rig-foundation, body.theme-cv .rig-ladder { display: block; }
.rig-foundation {
    left: 8%;
    bottom: -30px;
    width: 220px;
    height: 90px;
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    border: 3px solid rgba(122, 143, 74, 0.45);
    background: linear-gradient(180deg, rgba(122, 143, 74, 0.14), transparent);
}
.rig-ladder {
    right: 14%;
    top: 12%;
    width: 46px;
    height: 220px;
    border-inline: 3px solid rgba(122, 143, 74, 0.5);
    background-image: repeating-linear-gradient(180deg, rgba(122, 143, 74, 0.5) 0px, rgba(122, 143, 74, 0.5) 3px, transparent 3px, transparent 22px);
}

/* --- Management / misc (mg, et): shield emblem --- */
body.theme-mg .rig-shield, body.theme-et .rig-shield { display: block; }
.rig-shield {
    right: 12%;
    top: 16%;
    width: 120px;
    height: 140px;
    clip-path: polygon(50% 0%, 100% 20%, 100% 60%, 50% 100%, 0% 60%, 0% 20%);
    border: 3px solid color-mix(in srgb, var(--accent, #5b8cff) 40%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #5b8cff) 12%, transparent), transparent);
}

/* ===================== Discipline hero banner (3D showcase) ===================== */
.discipline-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 34px;
    border-radius: 26px;
    margin-bottom: 24px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid color-mix(in srgb, var(--accent, #38bdf8) 45%, rgba(148, 163, 184, 0.25));
    background:
        radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent, #38bdf8) 30%, transparent), transparent 55%),
        linear-gradient(135deg, color-mix(in srgb, var(--accent, #38bdf8) 12%, transparent), transparent 65%),
        linear-gradient(160deg, #131f38, #0b1220);
    box-shadow:
        0 24px 60px -24px color-mix(in srgb, var(--accent, #38bdf8) 55%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -30px 60px -40px color-mix(in srgb, var(--accent, #38bdf8) 40%, transparent);
    perspective: 900px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.discipline-hero:hover {
    transform: translateY(-3px) rotateX(1.5deg);
    box-shadow:
        0 32px 70px -22px color-mix(in srgb, var(--accent, #38bdf8) 65%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -30px 60px -40px color-mix(in srgb, var(--accent, #38bdf8) 45%, transparent);
}
.discipline-hero-glow {
    position: absolute;
    inset: -40% -10% auto auto;
    width: 60%;
    height: 180%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent, #38bdf8) 55%, transparent), transparent 65%);
    filter: blur(6px);
    opacity: 0.65;
    z-index: 0;
    pointer-events: none;
}
.discipline-hero-body { position: relative; z-index: 1; max-width: 58%; }
.discipline-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    color: color-mix(in srgb, var(--accent, #38bdf8) 85%, white);
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 8px;
}
.discipline-hero-label {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(90deg, #f8fafc, color-mix(in srgb, var(--accent, #38bdf8) 75%, white));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 8px 30px color-mix(in srgb, var(--accent, #38bdf8) 35%, transparent);
}
.discipline-hero-sub { margin: 0; color: var(--text-muted, #94a3b8); font-size: 14px; line-height: 1.8; }
.discipline-hero-art {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 200px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    filter: drop-shadow(0 18px 26px color-mix(in srgb, var(--accent, #38bdf8) 55%, transparent));
    transition: transform 0.45s ease, filter 0.45s ease;
    animation: hero-art-float 5.5s ease-in-out infinite;
}
.discipline-hero:hover .discipline-hero-art {
    transform: rotateY(-10deg) rotateX(6deg) scale(1.06);
    filter: drop-shadow(0 26px 34px color-mix(in srgb, var(--accent, #38bdf8) 70%, transparent));
}
.discipline-hero-art img { width: 100%; height: 100%; object-fit: contain; }
@keyframes hero-art-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@media (max-width: 720px) {
    .discipline-hero { flex-wrap: wrap; }
    .discipline-hero-body { max-width: 100%; }
    .discipline-hero-art { margin: 0 auto; }
}

/* ===================== Org chart tree ===================== */
.org-tree { padding: 18px 6px 8px; overflow-x: auto; }
.org-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}
.org-node {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 14px;
    background: var(--card-bg, #111a2e);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 13.5px;
    white-space: nowrap;
    box-shadow: 0 6px 18px -10px rgba(0,0,0,0.6);
}
.org-node i { font-size: 15px; }
.org-node.root-node {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #1a1002;
    border-color: transparent;
    font-weight: 700;
    padding: 12px 24px;
}
.org-node.head-node {
    border-color: var(--branch-accent, #38bdf8);
    color: var(--branch-accent, #38bdf8);
    font-weight: 600;
}
.org-node.member-node { font-size: 12.5px; color: var(--text-muted, #94a3b8); padding: 7px 14px; }
.org-root::after {
    content: "";
    width: 2px;
    height: 26px;
    background: linear-gradient(180deg, #f59e0b, rgba(148,163,184,0.4));
    margin-top: 4px;
}
.org-branches {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    position: relative;
}
.org-branch {
    --branch-accent: #38bdf8;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 22px;
}
.org-branch::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 22px;
    background: linear-gradient(180deg, rgba(148,163,184,0.5), var(--branch-accent, #38bdf8));
}
.org-branch-label {
    font-size: 11px;
    letter-spacing: 0.03em;
    color: var(--branch-accent, #38bdf8);
    margin-bottom: 8px;
    text-transform: uppercase;
    opacity: 0.85;
}
.org-members {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    position: relative;
}
.org-members::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: var(--branch-accent, #38bdf8);
    opacity: 0.5;
}
.org-branch:hover .org-node.head-node {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--branch-accent, #38bdf8) 35%, transparent);
}

/* ===================== Jalali datepicker popup ===================== */
.jalali-picker-popup {
    position: absolute;
    z-index: 500;
    display: none;
    width: min(268px, 92vw);
    max-width: 268px;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 14px;
    background: var(--card-bg, #111a2e);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 16px 40px -12px rgba(0,0,0,0.7);
    direction: rtl;
    font-size: 13px;
}
.jalali-picker-popup.show { display: block; }
.jp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.jp-nav {
    border: none;
    background: rgba(148, 163, 184, 0.12);
    color: inherit;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jp-nav:hover { background: rgba(56, 189, 248, 0.25); }
.jp-title { font-weight: 700; font-size: 13.5px; }
.jp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 4px;
}
.jp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.jp-cell {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jp-day {
    border: none;
    background: transparent;
    color: inherit;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.jp-day:hover { background: rgba(56, 189, 248, 0.18); }
.jp-day.jp-selected {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #06121f;
    font-weight: 700;
}
.jp-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.jp-today, .jp-clear {
    border: none;
    background: none;
    color: var(--accent, #38bdf8);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
}
.jp-clear { color: var(--text-muted, #94a3b8); }
.jp-today:hover, .jp-clear:hover { text-decoration: underline; }

@media (max-width: 520px) {
    .rig-tower, .rig-flare, .rig-tank.t2 { display: none; }
    .discipline-hero { flex-direction: column; align-items: flex-start; }
    .org-branches { gap: 18px; }
}

/* ===================== Org node inner labels / hero label ===================== */
.org-node { flex-direction: column; align-items: center; gap: 2px; text-align: center; text-decoration: none; color: inherit; }
.org-node-icon { font-size: 16px; margin-bottom: 2px; }
.org-node-name { font-weight: 700; font-size: 13px; }
.org-node-role { font-size: 10.5px; color: var(--text-muted, #94a3b8); }
.org-node.root-node .org-node-role { color: #1a1002; opacity: 0.75; }
.org-node.selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--branch-accent, #38bdf8) 45%, transparent); }
.org-branch-line {
    width: 2px;
    height: 22px;
    background: linear-gradient(180deg, rgba(148,163,184,0.5), var(--branch-accent, #38bdf8));
    margin-bottom: 4px;
}
.org-chart-card { margin-top: 20px; }
