/* ============================================================
   KR Nexus — Global Design System
   Elite Luxury Dark Theme | Plus Jakarta Sans
   ============================================================ */

:root {
    --bg-canvas:      #04060f;
    --bg-deep:        #070b16;
    --bg-panel:       #111726;
    --bg-panel-hover: #161e30;
    --border:         #1d283c;
    --border-bright:  #2a3a56;
    --teal:           #38bdf8;
    --teal-dim:       rgba(56,189,248,.12);
    --cyan:           #22d3ee;
    --gold:           #f0c060;
    --gold-dim:       rgba(240,192,96,.15);
    --red:            #f87171;
    --green:          #34d399;
    --text-primary:   #e8edf5;
    --text-secondary: #7d91ad;
    --text-muted:     #4a5a72;
    --font:           'Plus Jakarta Sans', system-ui, sans-serif;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --shadow-teal:    0 0 28px rgba(56,189,248,.18);
    --shadow-panel:   0 4px 24px rgba(0,0,0,.35);
    --trans:          all .22s cubic-bezier(.4,0,.2,1);
    --max-w:          1280px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    background: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: var(--trans); }
a:hover { color: var(--cyan); }
ul { list-style: none; }
button, input, select, textarea {
    font-family: var(--font);
    font-size: 1rem;
}

/* ── Layout Containers ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1rem, 5vw, 2.5rem); }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-sm { padding: clamp(2rem, 5vw, 3.5rem) 0; }

/* ── Typography ── */
.h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
.h4 { font-size: 1rem; font-weight: 600; }
.lead { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-secondary); line-height: 1.7; }
.text-teal  { color: var(--teal); }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.gradient-text {
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600; font-size: .9rem;
    cursor: pointer; border: none;
    transition: var(--trans); text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    color: #04060f;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-teal);
    color: #04060f;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: var(--teal-dim);
}
.btn-ghost {
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-bright); background: var(--bg-panel-hover); color: var(--text-primary); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold), #e8a930);
    color: #04060f;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(240,192,96,.3); color: #04060f; }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; }
.btn-danger { background: rgba(248,113,113,.15); border: 1px solid rgba(248,113,113,.35); color: var(--red); }
.btn-danger:hover { background: rgba(248,113,113,.25); color: var(--red); }
.btn-success { background: rgba(52,211,153,.15); border: 1px solid rgba(52,211,153,.35); color: var(--green); }
.btn-success:hover { background: rgba(52,211,153,.25); color: var(--green); }
.btn-full { width: 100%; }

/* ── Cards / Panels ── */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--trans);
}
.card:hover { border-color: var(--border-bright); }
.card-glow:hover { border-color: var(--teal); box-shadow: var(--shadow-teal); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* ── Section Labels ── */
.section-label {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--teal);
    background: var(--teal-dim);
    border: 1px solid rgba(56,189,248,.25);
    padding: .35rem .85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

/* ── Status Badges ── */
.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    padding: .28rem .75rem;
    border-radius: 999px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending  { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.badge-progress { background: rgba(56,189,248,.12);  color: var(--teal); border: 1px solid rgba(56,189,248,.25); }
.badge-review   { background: rgba(167,139,250,.12); color: #a78bfa; border: 1px solid rgba(167,139,250,.25); }
.badge-complete { background: rgba(52,211,153,.12);  color: var(--green); border: 1px solid rgba(52,211,153,.25); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block; margin-bottom: .45rem;
    font-size: .82rem; font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .02em;
}
.form-control {
    width: 100%;
    padding: .75rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: .9rem;
    transition: var(--trans);
    appearance: none;
    min-height: 48px;
}
.form-control:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-dim);
    background: rgba(7,11,22,.8);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { font-size: .78rem; color: var(--red); margin-top: .35rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── Alerts ── */
.alert {
    padding: .9rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: .875rem; font-weight: 500;
    margin-bottom: 1.25rem;
    border-width: 1px; border-style: solid;
}
.alert-success { background: rgba(52,211,153,.1);  border-color: rgba(52,211,153,.3);  color: var(--green); }
.alert-error   { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.3); color: var(--red); }
.alert-info    { background: var(--teal-dim);      border-color: rgba(56,189,248,.3);  color: var(--teal); }
.alert-gold    { background: var(--gold-dim);      border-color: rgba(240,192,96,.3);  color: var(--gold); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
    padding: .85rem 1.25rem;
    background: var(--bg-deep);
    color: var(--text-muted);
    font-weight: 600; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
    text-align: left; border-bottom: 1px solid var(--border);
}
.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-secondary);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-panel-hover); }
.table td strong { color: var(--text-primary); }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
}
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .5rem; }
.stat-icon { position: absolute; bottom: 1rem; right: 1rem; opacity: .07; font-size: 3.5rem; line-height: 1; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ── Notification items ── */
.notif-item {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: .6rem;
    transition: var(--trans);
}
.notif-item.unread { border-color: rgba(240,192,96,.3); background: var(--gold-dim); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: .35rem; }
.notif-dot.read { background: var(--border-bright); }
.notif-msg { font-size: .875rem; color: var(--text-secondary); flex: 1; }
.notif-time { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }

/* ── Tech Tags ── */
.tech-tag {
    display: inline-flex;
    padding: .25rem .65rem;
    background: var(--teal-dim);
    border: 1px solid rgba(56,189,248,.2);
    border-radius: var(--radius-sm);
    font-size: .72rem; font-weight: 600;
    color: var(--teal);
    letter-spacing: .03em;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ── Avatar ── */
.avatar {
    width: 52px; height: 52px; border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-bright);
}
.avatar-lg { width: 80px; height: 80px; }

/* ── Page Hero ── */
.page-hero {
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
    border-bottom: 1px solid var(--border);
}

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1rem; opacity: .35; }

/* ── Dashboard Layout ── */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 68px); }
.sidebar {
    background: var(--bg-deep);
    border-right: 1px solid var(--border);
    padding: 1.75rem 1rem;
    position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: .25rem; }
.sidebar-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1rem;
    border-radius: var(--radius-md);
    font-size: .875rem; font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--trans);
}
.sidebar-link:hover { background: var(--bg-panel); color: var(--text-primary); }
.sidebar-link.active { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(56,189,248,.2); }
.sidebar-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: 1.25rem 1rem .5rem; }
.dashboard-content { padding: 2rem; overflow-x: hidden; }

/* ── Bento Grid ── */
.bento-grid { display: grid; gap: 1.25rem; }
.bento-2 { grid-template-columns: repeat(2, 1fr); }
.bento-3 { grid-template-columns: repeat(3, 1fr); }
.bento-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 3.5rem 0 0;
    margin-top: auto;
}
.footer-inner {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2.5rem);
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer-tagline { font-size: .875rem; color: var(--text-muted); margin-top: .75rem; line-height: 1.6; }
.footer-social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.social-link {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--bg-panel); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: var(--trans);
}
.social-link:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }
.footer-nav-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); margin-bottom: 1rem; }
.footer-nav-list { display: flex; flex-direction: column; gap: .6rem; }
.footer-nav-list a { font-size: .875rem; color: var(--text-muted); transition: var(--trans); }
.footer-nav-list a:hover { color: var(--text-primary); }
.footer-bottom {
    max-width: var(--max-w); margin: 2.5rem auto 0;
    padding: 1.25rem clamp(1rem, 5vw, 2.5rem);
    border-top: 1px solid var(--border);
    font-size: .82rem; color: var(--text-muted);
}

/* ── Utility ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Animations ── */
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes glow-pulse { 0%,100% { box-shadow: 0 0 0 0 var(--teal-dim); } 50% { box-shadow: 0 0 24px 8px var(--teal-dim); } }
.animate-fade-up { animation: fade-up .6s ease both; }
.animate-fade-in { animation: fade-in .5s ease both; }
[data-delay="1"] { animation-delay: .1s; }
[data-delay="2"] { animation-delay: .2s; }
[data-delay="3"] { animation-delay: .3s; }
[data-delay="4"] { animation-delay: .4s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .bento-4 { grid-template-columns: repeat(2, 1fr); }
    .bento-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; display: none; }
}
@media (max-width: 768px) {
    .bento-2, .bento-3, .bento-4 { grid-template-columns: 1fr; }
    .col-span-2, .col-span-3 { grid-column: span 1; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .dashboard-content { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ── Auth Pages ── */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg-canvas);
    background-image: radial-gradient(ellipse at 20% 50%, rgba(56,189,248,.05) 0%, transparent 60%),
                      radial-gradient(ellipse at 80% 20%, rgba(34,211,238,.04) 0%, transparent 50%);
    padding: 2rem 1rem;
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-panel);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .4rem; }
.auth-subtitle { font-size: .875rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }

/* ── Portfolio Cards ── */
.portfolio-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--trans);
    position: relative; overflow: hidden;
}
.portfolio-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    transform: scaleX(0); transform-origin: left;
    transition: var(--trans);
}
.portfolio-card:hover::after { transform: scaleX(1); }
.portfolio-card:hover { border-color: var(--border-bright); transform: translateY(-3px); box-shadow: var(--shadow-panel); }
.impact-metric {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 700;
    color: var(--gold);
    background: var(--gold-dim);
    border: 1px solid rgba(240,192,96,.25);
    padding: .3rem .8rem; border-radius: 999px;
    margin-bottom: 1rem;
}

/* ── Team Cards ── */
.team-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--trans);
}
.team-card:hover { border-color: var(--teal); transform: translateY(-4px); box-shadow: var(--shadow-teal); }
.team-avatar {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--border-bright);
    margin: 0 auto 1rem;
    transition: var(--trans);
}
.team-card:hover .team-avatar { border-color: var(--teal); }
.team-name { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.team-role { font-size: .8rem; font-weight: 600; color: var(--teal); margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.team-resp { font-size: .82rem; color: var(--text-muted); line-height: 1.6; }

/* ── Mobile Sticky CTA ── */
.mobile-sticky-cta {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
    background: rgba(7,11,22,.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: .75rem 1rem;
    gap: .5rem;
}
@media (max-width: 768px) { .mobile-sticky-cta { display: flex; } }

/* ── Calendar / Booking ── */
.booking-iframe {
    width: 100%; border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    min-height: 700px;
}

/* ── Admin Sidebar Active ── */
.admin-sidebar .sidebar-link.active {
    background: var(--teal-dim);
    color: var(--teal);
}

/* ── Project Update Form ── */
.update-form-inline {
    display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap;
}
