/* Webnet Project Portal — matches the main site's Inter/Space Grotesk + violet accent. */
:root {
  --accent: #6C5CE7; --accent-2: #8B7BFF; --accent-soft: #EEEBFF;
  --ink: #141826; --ink-2: #4A5068; --ink-3: #7D8296;
  --bg: #F5F6FB; --surface: #fff; --line: #E6E8F0;
  --side: #0F1220; --side-2: #1A1F33; --side-text: #B7BCCC;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,24,38,.04), 0 8px 24px rgba(20,24,38,.06);
  --bs-primary: var(--accent); --bs-primary-rgb: 108,92,231; --bs-link-color: var(--accent); --bs-link-hover-color: #5546c9;
}
body.portal { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--ink); }
h1, h2, h3, h4, h5, .font-display { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.01em; }
a { color: var(--accent); }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: #5546c9; --bs-btn-hover-border-color: #5546c9; --bs-btn-active-bg: #4a3db5; --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); }
.btn-outline-primary { --bs-btn-color: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-active-bg: var(--accent); }
.text-bg-primary { background-color: var(--accent) !important; }
.form-control:focus, .form-select:focus { border-color: var(--accent-2); box-shadow: 0 0 0 .2rem rgba(108,92,231,.18); }
.form-label { font-weight: 600; font-size: .875rem; color: var(--ink-2); }

/* ---------- Shell ---------- */
.sidebar { width: 260px; background: linear-gradient(180deg, var(--side), #121628); color: var(--side-text); display: flex; flex-direction: column; }
@media (min-width: 992px) { .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; } .main { margin-left: 260px; } }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.4rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-brand strong { display: block; color: #fff; font-family: "Space Grotesk"; font-size: 1.15rem; }
.sidebar-brand small { color: var(--side-text); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.2rem; background: linear-gradient(135deg, var(--accent), #B06BFF); box-shadow: 0 6px 18px rgba(124,107,255,.4); }
.sidebar-nav { padding: 1rem .75rem; flex: 1; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; margin-bottom: .2rem; border-radius: 10px; color: var(--side-text); text-decoration: none; font-weight: 500; font-size: .93rem; transition: background .15s, color .15s; }
.sidebar-nav a i { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.sidebar-nav a:hover { background: var(--side-2); color: #fff; }
.sidebar-nav a.active { background: linear-gradient(90deg, rgba(124,107,255,.28), rgba(124,107,255,.06)); color: #fff; box-shadow: inset 3px 0 0 var(--accent-2); }
.sidebar-foot { padding: 1rem; border-top: 1px solid rgba(255,255,255,.06); }
.btn-logout { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; }
.btn-logout:hover { background: #E5484D; color: #fff; border-color: #E5484D; }

.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.5rem; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-title { font-size: 1.2rem; margin: 0; font-weight: 600; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar-user strong { display: block; font-size: .9rem; } .topbar-user small { color: var(--ink-3); font-size: .78rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), #B06BFF); flex-shrink: 0; }
.btn-icon { font-size: 1.5rem; padding: .1rem .4rem; border: 0; }
.content { padding: 1.5rem; max-width: 1400px; }
@media (max-width: 575px) { .content { padding: 1rem; } .topbar { padding: .75rem 1rem; } }

/* ---------- Cards ---------- */
.card-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-x > .card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-x > .card-head h2 { font-size: 1.05rem; margin: 0; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.card-x > .card-head h2 i { color: var(--accent); }
.card-x > .card-body-x { padding: 1.25rem; }

.welcome { position: relative; overflow: hidden; border-radius: var(--radius); padding: 1.75rem; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(176,107,255,.55), transparent 45%), linear-gradient(120deg, #1B1745, #3B2A9A 60%, #6C5CE7); box-shadow: 0 12px 32px rgba(76,60,190,.25); }
.welcome h2 { font-size: 1.6rem; margin-bottom: .35rem; } .welcome p { color: rgba(255,255,255,.8); margin: 0; }
.welcome .bi-stars { position: absolute; right: 1.5rem; bottom: -.5rem; font-size: 6rem; opacity: .12; }

.stat { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; }
.stat-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-value { font-family: "Space Grotesk"; font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--ink-3); font-size: .85rem; margin-top: .3rem; }
.tone-violet { background: #EEEBFF; color: #6C5CE7; } .tone-blue { background: #E3F0FF; color: #2F7DE1; }
.tone-green { background: #DDF7EC; color: #13A36E; } .tone-amber { background: #FFF2D9; color: #D98B06; } .tone-rose { background: #FFE4E6; color: #E5484D; }

.profile-list { list-style: none; padding: 0; margin: 0; }
.profile-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.profile-list li:last-child { border-bottom: 0; } .profile-list span { color: var(--ink-3); } .profile-list strong { text-align: right; }

.item-list { list-style: none; padding: 0; margin: 0; }
.item-list li { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.item-list li:last-child { border-bottom: 0; }
.item-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.item-title { font-weight: 600; margin: 0; } .item-meta { color: var(--ink-3); font-size: .8rem; }
.item-desc { color: var(--ink-2); font-size: .9rem; margin: .3rem 0 0; white-space: pre-line; }

.empty-state { text-align: center; padding: 2rem 1rem; color: var(--ink-3); }
.empty-state i { font-size: 2.2rem; display: block; margin-bottom: .5rem; opacity: .6; } .empty-state p { margin: 0; }

.table-x { margin: 0; } .table-x th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; background: #FAFAFD; white-space: nowrap; }
.table-x td, .table-x th { padding: .8rem 1rem; vertical-align: middle; } .table-x tbody tr:hover { background: #FAFAFF; }
.pagination { --bs-pagination-active-bg: var(--accent); --bs-pagination-active-border-color: var(--accent); --bs-pagination-color: var(--accent); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--accent); } .nav-pills .nav-link { color: var(--ink-2); font-weight: 500; }

/* ---------- Auth pages ---------- */
body.auth-page { min-height: 100vh; background: radial-gradient(circle at 15% 15%, rgba(124,107,255,.35), transparent 40%), radial-gradient(circle at 85% 85%, rgba(176,107,255,.25), transparent 40%), #0A0C12; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 2.25rem; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.auth-card.wide { max-width: 760px; }
.auth-card .brand-mark { width: 52px; height: 52px; font-size: 1.5rem; margin-bottom: 1rem; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .25rem; } .auth-card .lead-sm { color: var(--ink-3); font-size: .93rem; margin-bottom: 1.5rem; }
.auth-foot { margin-top: 1.5rem; } .auth-foot a { color: #B7BCCC; text-decoration: none; font-size: .9rem; } .auth-foot a:hover { color: #fff; }
.role-tile { display: block; height: 100%; padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.role-tile:hover { transform: translateY(-3px); border-color: var(--accent-2); box-shadow: 0 12px 30px rgba(108,92,231,.18); color: var(--ink); }
.role-tile .stat-icon { margin-bottom: 1rem; } .role-tile h2 { font-size: 1.15rem; } .role-tile p { color: var(--ink-3); font-size: .9rem; margin: 0; }

/* ---------- Notifications ---------- */
.sidebar-nav .nav-badge { margin-left: auto; min-width: 1.4rem; padding: .1rem .45rem; border-radius: 99px; background: #E5484D; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); font-size: 1.25rem; text-decoration: none; transition: background .15s; }
.bell:hover { background: var(--accent-soft); color: var(--accent); }
.bell .bi-bell-fill { color: var(--accent); animation: bell-ring 2.4s ease-in-out 1; transform-origin: top center; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: #E5484D; color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
@keyframes bell-ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
@media (prefers-reduced-motion: reduce) { .bell .bi-bell-fill { animation: none; } }

.notice-list { display: grid; gap: .75rem; }
.notice { position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.notice:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20,24,38,.08); }
a.notice:focus-visible { outline: 3px solid rgba(108,92,231,.45); outline-offset: 2px; }
.notice.prio-important { border-left-color: #F5A524; background: linear-gradient(90deg, #FFF8EA, var(--surface) 45%); }
.notice.prio-urgent { border-left-color: #E5484D; background: linear-gradient(90deg, #FFEEEF, var(--surface) 45%); }
.notice.is-unread { border-color: #D7D1FF; box-shadow: 0 0 0 1px rgba(108,92,231,.12); }
.notice.is-unread.prio-normal { border-left-color: var(--accent); }
.notice.is-unread .notice-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: .45rem; vertical-align: middle; }
.notice-body { flex: 1; min-width: 0; }
.notice-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .3rem; }
.notice-cat { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-right: .2rem; }
.notice-new { font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; background: var(--accent); color: #fff; letter-spacing: .03em; }
.notice-title { font-weight: 600; margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.notice.is-unread .notice-title { font-weight: 700; }
.notice-excerpt { color: var(--ink-2); font-size: .88rem; margin: .3rem 0 0; overflow-wrap: anywhere; }
.notice-text { color: var(--ink-2); margin-top: .75rem; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; }
.notice-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .5rem; color: var(--ink-3); font-size: .78rem; }
.notice-go { color: var(--ink-3); align-self: center; transition: transform .15s; } a.notice:hover .notice-go { transform: translateX(3px); color: var(--accent); }
.notice-full { padding: 1.5rem; } .notice-full .notice-title { font-size: 1.3rem; }
.notice-full .item-icon { width: 52px; height: 52px; font-size: 1.4rem; }
.urgent-strip { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border-radius: 12px; background: #FFEEEF; border: 1px solid #FFC9CC; color: #A8262B; text-decoration: none; font-weight: 500; }
.urgent-strip:hover { color: #8A1E22; background: #FFE3E5; }
@media (max-width: 575px) { .notice { padding: .85rem; gap: .7rem; } .notice .item-icon { width: 36px; height: 36px; font-size: 1rem; } .notice-go { display: none; } .notice-full { padding: 1.1rem; } }
