:root {
    --ink: #0b1f3a;
    --muted: #5b6f91;
    --line: rgba(0, 83, 179, .10);
    --surface: #ffffff;
    --surface-soft: #f4f8ff;
    --cream: #ffffff;
    --navy: #0053b3;
    --navy-2: #083b87;
    --gold: #ffd21f;
    --gold-soft: #fff1a8;
    --success: #087f5b;
    --danger: #c24135;
    --warning: #b7791f;
    --info: #1d6f9f;
    --purple: #7c3aed;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow-soft: 0 18px 55px rgba(15, 23, 42, .10);
    --shadow-card: 0 12px 36px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 210, 31, .30), transparent 30rem),
        radial-gradient(circle at top right, rgba(0, 83, 179, .18), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, #f4f8ff 42%, #ffffff 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.01em;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

.fw-black { font-weight: 900; }

.app-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 18px 16px 96px;
}

.public-topbar,
.admin-topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 32px rgba(15, 23, 42, .08);
    backdrop-filter: blur(18px);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--navy);
}

.brand-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--navy-2));
    box-shadow: 0 10px 26px rgba(0, 83, 179, .25);
    border: 2px solid rgba(255, 210, 31, .75);
}

.hero-card,
.glass-card,
.mobile-card,
.stat-card,
.form-card {
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.home-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 78vh;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 36px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(0, 38, 86, .10) 0%, rgba(0, 60, 135, .42) 38%, rgba(0, 45, 110, .94) 100%),
        radial-gradient(circle at 84% 12%, rgba(255, 210, 31, .58), transparent 16rem),
        var(--hero-photo) center top / cover no-repeat,
        linear-gradient(145deg, var(--navy), var(--navy-2));
    box-shadow: 0 28px 70px rgba(0, 83, 179, .24);
    isolation: isolate;
}

.home-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(90deg, rgba(0, 83, 179, .70), rgba(0, 83, 179, .08) 55%, rgba(255, 210, 31, .18));
}

.home-hero-shine {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 96px;
    height: 96px;
    border-radius: 34px;
    background: rgba(255, 210, 31, .92);
    box-shadow: 0 24px 80px rgba(255, 210, 31, .42);
    opacity: .92;
}

.home-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding-top: 170px;
}

.home-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .44);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(14px);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.home-hero h1 {
    max-width: 660px;
    margin: 0;
    font-size: clamp(3.1rem, 16vw, 7.5rem);
    font-weight: 950;
    line-height: .82;
    letter-spacing: -.085em;
    text-shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

.home-function,
.home-company {
    margin: 14px 0 0;
    font-weight: 900;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}

.home-function {
    color: var(--gold);
    font-size: clamp(1.25rem, 5vw, 2rem);
}

.home-company {
    max-width: 520px;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(1rem, 4vw, 1.35rem);
}

.home-main-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    margin-top: 26px;
    padding: 18px 22px;
    border-radius: 22px;
    color: var(--navy-2);
    background: linear-gradient(135deg, #fffbe7, var(--gold));
    box-shadow: 0 18px 46px rgba(255, 210, 31, .34);
    font-size: 1.02rem;
    font-weight: 950;
}

.home-main-cta:hover {
    color: var(--navy-2);
    transform: translateY(-2px);
}

.home-hero-footer {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .24);
    color: rgba(255, 255, 255, .86);
    font-size: .88rem;
    font-weight: 800;
}

.home-hero-footer span,
.home-hero-footer a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.home-intro-card {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid rgba(0, 83, 179, .10);
    border-radius: 32px;
    background: rgba(255, 255, 255, .90);
    box-shadow: var(--shadow-card);
}

.home-intro-card h2 {
    max-width: 760px;
    margin: 18px 0 12px;
    color: var(--navy-2);
    font-size: clamp(1.65rem, 7vw, 3.25rem);
    font-weight: 950;
    line-height: .98;
    letter-spacing: -.06em;
}

.home-intro-card p {
    max-width: 860px;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.home-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
}

.home-action-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid rgba(0, 83, 179, .10);
    border-radius: 28px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow-card);
}

.home-action-card i {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 18px;
    color: var(--navy);
    background: rgba(255, 210, 31, .28);
}

.home-action-card strong {
    color: var(--navy-2);
    font-size: 1.05rem;
    font-weight: 950;
}

.home-action-card span {
    color: var(--muted);
    line-height: 1.5;
}

.home-action-card.primary {
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--navy-2));
}

.home-action-card.primary i {
    color: var(--navy-2);
    background: var(--gold);
}

.home-action-card.primary strong,
.home-action-card.primary span { color: #fff; }

.home-process {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.home-process article {
    padding: 20px;
    border: 1px solid rgba(0, 83, 179, .10);
    border-radius: 28px;
    background: linear-gradient(180deg, #fff, #f4f8ff);
    box-shadow: var(--shadow-card);
}

.home-process span {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 16px;
    color: var(--navy-2);
    background: var(--gold);
    font-weight: 950;
}

.home-process strong {
    display: block;
    color: var(--navy-2);
    font-size: 1.08rem;
    font-weight: 950;
}

.home-process p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-card {
    overflow: hidden;
    margin-top: 18px;
}

.hero-cover {
    position: relative;
    min-height: 270px;
    padding: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(0, 83, 179, .98), rgba(8, 59, 135, .94) 58%, rgba(255, 210, 31, .92)),
        radial-gradient(circle at 82% 22%, rgba(255,255,255,.18), transparent 14rem);
}

.hero-cover::after {
    position: absolute;
    inset: auto -70px -130px auto;
    width: 260px;
    height: 260px;
    content: "";
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
}

.dg-portrait {
    position: relative;
    z-index: 1;
    width: 112px;
    height: 140px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, .72);
    border-radius: 34px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.hero-title {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin-top: 22px;
}

.hero-title h1 {
    margin: 0;
    font-size: clamp(2.35rem, 11vw, 5.2rem);
    font-weight: 850;
    line-height: .92;
    letter-spacing: -.07em;
}

.hero-title p { margin: 12px 0 0; color: rgba(255,255,255,.78); }

.hero-body { padding: 22px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #66450d;
    background: rgba(255, 210, 31, .28);
    font-size: .84rem;
    font-weight: 700;
}

.btn-premium,
.btn-ghost,
.btn-touch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    border-radius: 16px;
    font-weight: 800;
}

.btn-premium {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    box-shadow: 0 14px 34px rgba(0, 83, 179, .22);
}

.btn-premium:hover { color: #fff; transform: translateY(-1px); }

.btn-ghost {
    border: 1px solid rgba(0, 83, 179, .16);
    color: var(--navy);
    background: rgba(255, 255, 255, .78);
}

.section-title {
    margin: 28px 0 14px;
    font-size: 1.1rem;
    font-weight: 850;
    color: var(--navy);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.info-tile {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, .74);
}

.info-tile i {
    display: grid;
    flex: 0 0 42px;
    height: 42px;
    place-items: center;
    border-radius: 16px;
    color: var(--gold);
    background: rgba(255, 210, 31, .22);
}

.form-card { padding: 20px; }

.form-label {
    margin-bottom: 7px;
    color: var(--navy);
    font-size: .86rem;
    font-weight: 800;
}

.form-control,
.form-select {
    min-height: 50px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, .88);
}

textarea.form-control { min-height: 118px; }

.form-control:focus,
.form-select:focus {
    border-color: rgba(183, 139, 63, .52);
    box-shadow: 0 0 0 .22rem rgba(183, 139, 63, .16);
}

.mobile-bottom-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 28px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 54px rgba(15, 23, 42, .18);
    backdrop-filter: blur(20px);
}

.mobile-bottom-nav a {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-radius: 20px;
    color: var(--muted);
    font-size: .70rem;
    font-weight: 800;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--navy-2));
    box-shadow: inset 0 -3px 0 rgba(255, 210, 31, .95);
}

.admin-layout { padding-bottom: 96px; }

.admin-sidebar {
    display: none;
}

.dashboard-header {
    margin-top: 18px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--navy-2) 62%, var(--gold));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.dashboard-header h1 {
    margin: 0;
    font-size: clamp(2rem, 9vw, 4.2rem);
    font-weight: 860;
    line-height: .95;
    letter-spacing: -.06em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat-card { padding: 16px; }
.stat-card .value { font-size: 1.95rem; font-weight: 860; color: var(--navy); }
.stat-card .label { color: var(--muted); font-size: .82rem; font-weight: 800; }

.timeline {
    position: relative;
    display: grid;
    gap: 12px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: start;
}

.timeline-time {
    color: var(--gold);
    font-weight: 900;
}

.timeline-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.74);
}

.badge-soft-warning,
.badge-soft-info,
.badge-soft-primary,
.badge-soft-success,
.badge-soft-purple,
.badge-soft-danger,
.badge-soft-dark,
.badge-soft-live,
.badge-soft-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.badge-soft-warning { color: #8a5600; background: #fff2cc; }
.badge-soft-info { color: #075985; background: #dff4ff; }
.badge-soft-primary { color: #1d4ed8; background: #e1ebff; }
.badge-soft-success { color: #047857; background: #dffbea; }
.badge-soft-purple { color: #6d28d9; background: #eee7ff; }
.badge-soft-danger { color: #b42318; background: #ffe4e0; }
.badge-soft-dark { color: #334155; background: #e2e8f0; }
.badge-soft-live { color: #fff; background: linear-gradient(135deg, #16a34a, #0f766e); }
.badge-soft-secondary { color: #475569; background: #eef2f7; }

.app-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.app-table tr { border-radius: 18px; }
.app-table td,
.app-table th { padding: 14px; vertical-align: middle; }
.app-table tbody tr { background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.app-table tbody td:first-child { border-radius: 18px 0 0 18px; }
.app-table tbody td:last-child { border-radius: 0 18px 18px 0; }

.fc {
    --fc-border-color: rgba(15, 23, 42, .08);
    --fc-today-bg-color: rgba(255, 210, 31, .16);
    --fc-button-bg-color: #0053b3;
    --fc-button-border-color: #0053b3;
    --fc-button-active-bg-color: #083b87;
    --fc-button-active-border-color: #083b87;
    font-family: inherit;
}

.fc .fc-toolbar-title { font-size: 1.08rem; font-weight: 900; color: var(--navy); }
.fc .fc-button { border-radius: 12px; font-weight: 800; }
.fc .calendar-blocked-slot {
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .22);
    font-weight: 800;
}
.fc .calendar-blocked-slot .fc-event-title::before {
    content: '🔒 ';
}

.empty-state {
    padding: 26px;
    text-align: center;
    color: var(--muted);
}

.app-copyright {
    margin: 34px 0 8px;
    padding: 12px 16px;
    color: rgba(91, 111, 145, .78);
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.today-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 210px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 24px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 15%, rgba(255,255,255,.24), transparent 11rem),
        linear-gradient(145deg, #0053b3 0%, #083b87 58%, #ffd21f 100%);
    box-shadow: var(--shadow-soft);
}

.today-day {
    display: block;
    margin-bottom: 10px;
    color: rgba(255,255,255,.74);
    font-size: 1.05rem;
    font-weight: 800;
}

.today-hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 11vw, 5rem);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.07em;
}

.today-hero p { margin: 14px 0 0; color: rgba(255,255,255,.78); font-weight: 800; }
.today-orb { display: grid; flex: 0 0 72px; height: 72px; place-items: center; border-radius: 28px; background: rgba(255,255,255,.14); font-size: 1.6rem; }

.next-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    color: #66450d;
    background: rgba(255, 210, 31, .30);
    box-shadow: var(--shadow-card);
    font-weight: 900;
}

.today-list { display: grid; gap: 14px; }

.today-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 30px;
    background: rgba(255,255,255,.86);
    box-shadow: var(--shadow-card);
}

.today-time {
    display: grid;
    min-height: 112px;
    place-items: center;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--navy-2));
    box-shadow: inset 0 -4px 0 rgba(255, 210, 31, .95);
    font-size: 1.18rem;
    font-weight: 900;
}

.today-content { padding: 4px 2px; }
.today-content h2 { margin: 0 0 5px; color: var(--navy); font-size: 1.05rem; font-weight: 900; letter-spacing: -.03em; }
.today-content p { margin: 0 0 6px; color: var(--muted); }
.today-content .org { color: var(--ink); font-weight: 800; }
.today-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--muted); font-size: .78rem; font-weight: 800; }

@media (max-width: 767px) {
    .app-shell { padding-right: 12px; padding-left: 12px; }
    .admin-topbar { top: 8px; padding: 10px 12px; }
    .dashboard-header { padding: 20px; border-radius: 28px; }
    .form-card, .glass-card { border-radius: 24px; }
    .btn-premium, .btn-ghost, .btn-touch { width: 100%; min-height: 52px; }
    .app-table, .app-table thead, .app-table tbody, .app-table tr, .app-table td { display: block; width: 100%; }
    .app-table thead { display: none; }
    .app-table { border-spacing: 0; }
    .app-table tbody tr { margin-bottom: 12px; padding: 14px; border-radius: 24px; }
    .app-table tbody td { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; text-align: right; }
    .app-table tbody td::before { content: attr(data-label); color: var(--muted); font-weight: 900; text-align: left; }
    .app-table tbody td:first-child, .app-table tbody td:last-child { border-radius: 0; }
    .swal2-popup { width: calc(100% - 24px) !important; border-radius: 28px !important; }
    .swal2-input, .swal2-textarea { width: calc(100% - 2em) !important; }
}

@media (min-width: 768px) {
    .app-shell { padding: 26px 24px 42px; }
    .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-hero { min-height: 720px; padding: 42px; border-radius: 44px; }
    .home-hero-content { padding-top: 240px; }
    .home-main-cta { width: auto; min-width: 310px; }
    .home-hero-footer { display: flex; align-items: center; justify-content: space-between; }
    .home-actions-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-process { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-intro-card { padding: 34px; }
    .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .hero-cover { min-height: 360px; padding: 42px; }
    .dg-portrait { width: 142px; height: 178px; }
}

@media (min-width: 992px) {
    .mobile-bottom-nav { display: none; }
    .admin-layout {
        display: grid;
        grid-template-columns: 268px minmax(0, 1fr);
        gap: 24px;
        padding-bottom: 42px;
    }
    .admin-sidebar {
        position: sticky;
        top: 24px;
        display: flex;
        height: calc(100vh - 48px);
        flex-direction: column;
        padding: 18px;
        border: 1px solid rgba(255,255,255,.72);
        border-radius: 30px;
        background: rgba(15, 23, 42, .94);
        color: #fff;
        box-shadow: var(--shadow-soft);
    }
    .admin-sidebar .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 48px;
        margin: 4px 0;
        padding: 12px 14px;
        border-radius: 16px;
        color: rgba(255,255,255,.72);
        font-weight: 800;
    }
    .admin-sidebar .nav-link.active,
    .admin-sidebar .nav-link:hover {
        color: #fff;
        background: rgba(255,255,255,.12);
    }
}
