/* ==========================================================================
   SIPAU — Sistem Pengawasan Angkutan Udara
   Aviation Glassmorphism Design System (Navy Blue + Gold + Dark Glow)
   ========================================================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    /* Primary Colors - Deep Aviation Navy */
    --navy-950: #070d19;
    --navy-900: #0b1528;
    --navy-850: #101c34;
    --navy-800: #142442;
    --navy-700: #1b2e52;
    --navy-600: #233b66;
    --navy-500: #2e4b7f;
    --navy-400: #4165a3;
    --navy-300: #6287c8;
    --navy-200: #93b1e6;
    --navy-100: #cddefa;

    /* Metallic Gold Accent */
    --gold-700: #856720;
    --gold-600: #aa862e;
    --gold-500: #d4af37;
    --gold-400: #e5c358;
    --gold-300: #f3d77d;
    --gold-200: #f9e7a8;
    --gold-100: #fcf4d4;

    /* Accent Glows & Neon Indicators */
    --cyan-glow: #00f2fe;
    --blue-glow: #4facfe;

    /* Semantic Colors */
    --success: #10b981;
    --success-hover: #059669;
    --success-bg: rgba(16, 185, 129, 0.14);
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.14);

    /* Backgrounds */
    --bg-primary: #070d19;
    --bg-secondary: #0f192d;
    --bg-surface: #14223c;
    --bg-card: rgba(19, 33, 59, 0.65);
    --bg-card-hover: rgba(27, 46, 82, 0.75);
    --bg-input: rgba(8, 16, 31, 0.85);
    --bg-overlay: rgba(5, 10, 20, 0.88);

    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-gold: #d4af37;

    /* Borders */
    --border-primary: rgba(46, 75, 127, 0.45);
    --border-light: rgba(98, 135, 200, 0.18);
    --border-gold: rgba(212, 175, 55, 0.45);

    /* Glass Effect & Shadows */
    --glass-bg: rgba(16, 28, 51, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --glow-shadow: 0 0 25px rgba(212, 175, 55, 0.15);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 76px;
}

/* ---------- Custom Selection & Scrollbar ---------- */
::selection {
    background: var(--gold-500);
    color: var(--navy-950);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--navy-950);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-600);
    border-radius: var(--radius-full);
    border: 2px solid var(--navy-950);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-500);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Ambient Ambient Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, rgba(46, 75, 127, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(212, 175, 55, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 40%, rgba(15, 25, 45, 0.5) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--gold-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold-300);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
h5 { font-size: 0.95rem; font-weight: 600; }
h6 { font-size: 0.85rem; font-weight: 600; }

.text-gold { color: var(--text-gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ---------- App Layout Wrapper ---------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl) var(--space-2xl);
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

/* ---------- Sidebar Navigation ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-normal), transform var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-height: 80px;
    background: rgba(11, 21, 40, 0.8);
    backdrop-filter: blur(10px);
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--navy-950);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
    transition: transform var(--transition-bounce);
}

.sidebar-logo:hover {
    transform: scale(1.08) rotate(-5deg);
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) var(--space-md);
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-muted);
    padding: var(--space-md) var(--space-sm) var(--space-xs);
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
    margin-bottom: 4px;
    text-decoration: none;
    position: relative;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(46, 75, 127, 0.25);
    color: var(--text-primary);
    border-color: rgba(98, 135, 200, 0.2);
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.04));
    color: var(--gold-300);
    border-left: 3.5px solid var(--gold-500);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-item .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-950);
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.sidebar-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: rgba(11, 21, 40, 0.5);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
    border: 2px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--gold-300);
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--gold-400);
    text-transform: capitalize;
    font-weight: 500;
}

/* ---------- Top Bar & Header ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.topbar-left h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
}

.topbar-left .breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    font-weight: 500;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--gold-300);
}

.breadcrumb .separator {
    margin: 0 var(--space-xs);
    color: var(--text-muted);
    opacity: 0.6;
}

/* ---------- Cards (Glassmorphic) ---------- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.card:hover {
    border-color: rgba(98, 135, 200, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.card-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 25, 45, 0.4);
}

.card-header h2,
.card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: var(--space-xl);
}

.card-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-md);
    background: rgba(15, 25, 45, 0.3);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.68rem 1.35rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.3;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-950);
    border-color: var(--gold-400);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
    transform: translateY(-2px);
    color: var(--navy-950);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.btn-secondary:hover {
    background: var(--navy-600);
    border-color: var(--navy-300);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

.btn-outline:hover {
    background: rgba(46, 75, 127, 0.25);
    color: var(--text-primary);
    border-color: var(--navy-300);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: var(--success);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 0.42rem 0.95rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.88rem 1.85rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Button Ripple Animation */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---------- Forms & Inputs ---------- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1.1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.92rem;
    transition: all var(--transition-fast);
    line-height: 1.5;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(11, 21, 40, 0.95);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23d4af37' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25em;
    padding-right: 2.75rem;
}

.form-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.76rem;
    color: var(--danger);
    margin-top: var(--space-xs);
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* ---------- Custom Radio & Checkbox Pills ---------- */
.check-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.check-option {
    position: relative;
}

.check-option input[type="radio"],
.check-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.check-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.35rem;
    min-width: 64px;
    min-height: 46px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-input);
    transition: all var(--transition-fast);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.check-option label:hover {
    border-color: var(--navy-300);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.check-option input:checked + label {
    border-color: var(--gold-500);
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold-300);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.check-option.check-success input:checked + label {
    border-color: var(--success);
    background: var(--success-bg);
    color: #6ee7b7;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.check-option.check-danger input:checked + label {
    border-color: var(--danger);
    background: var(--danger-bg);
    color: #fca5a5;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.check-option.check-warning input:checked + label {
    border-color: var(--warning);
    background: var(--warning-bg);
    color: #fde047;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

/* ---------- Progress Stepper (8-Tahap Workflow) ---------- */
.stepper-container {
    width: 100%;
    overflow-x: auto;
    padding: 12px 0 20px;
}

.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 760px;
    position: relative;
    padding: 10px 0;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
    position: relative;
}

.stepper-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

.stepper-circle-container {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.stepper-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    border: 2px solid var(--border-primary);
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.stepper-circle:hover {
    border-color: var(--gold-400);
    color: var(--gold-300);
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}

.stepper-step.active .stepper-circle {
    border-color: var(--gold-400);
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-950);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    transform: scale(1.1);
}

.stepper-step.completed .stepper-circle {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.stepper-step.completed .stepper-circle::after {
    content: '✓';
    font-size: 1.1rem;
    font-weight: 900;
}

.stepper-line {
    flex: 1;
    height: 3px;
    background: var(--border-primary);
    margin-top: 22px;
    margin-left: -24px;
    margin-right: -24px;
    z-index: 1;
    transition: background 0.4s ease;
}

.stepper-line.completed {
    background: linear-gradient(90deg, var(--success), var(--gold-500));
}

.stepper-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
    line-height: 1.35;
    max-width: 100px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    word-break: break-word;
    font-weight: 500;
    transition: color 0.2s ease;
}

.stepper-step.active .stepper-label {
    color: var(--gold-300);
    font-weight: 800;
}

.stepper-step.completed .stepper-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---------- Status Badges & Pulsing Dots ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.badge-draft {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.35);
}

.badge-proses {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-selesai {
    background: var(--success-bg);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-ditandatangani {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-300);
    border: 1px solid var(--border-gold);
}

.badge-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ---------- Data Tables ---------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem 1.15rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background: rgba(11, 21, 40, 0.7);
    backdrop-filter: blur(8px);
}

.table tr:hover td {
    background: rgba(46, 75, 127, 0.18);
}

/* ---------- Alert & Notifications ---------- */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid;
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fde047;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

/* ---------- Stats Cards Grid ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--navy-500);
    transition: background var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(98, 135, 200, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.stat-card:hover::before {
    background: var(--gold-500);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.stat-card-icon.gold {
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold-300);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.stat-card-icon.blue {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-card-icon.green {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-card-icon.orange {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.03em;
}

.stat-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

/* ---------- Drag & Drop File Upload Zone ---------- */
.upload-zone {
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-input);
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--gold-500);
    background: rgba(212, 175, 55, 0.06);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.upload-zone-icon {
    font-size: 2.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    transition: transform var(--transition-bounce);
}

.upload-zone:hover .upload-zone-icon {
    transform: translateY(-4px) scale(1.1);
    color: var(--gold-400);
}

.upload-zone-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.upload-zone-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Upload Preview */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.upload-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.upload-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.upload-item-info {
    padding: var(--space-sm);
}

.upload-item-name {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.upload-item-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.upload-item-remove:hover {
    background: var(--danger);
    transform: scale(1.15);
}

/* ---------- Signature Pad ---------- */
.signature-container {
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.signature-container canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
}

.signature-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.signature-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.signature-tab.active {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--gold-500);
    color: var(--gold-300);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    min-width: 320px;
    max-width: 440px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--info); }

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ---------- Modal Dialog ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    width: 95%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.92);
    transition: transform var(--transition-bounce);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* ---------- Pengawasan Item List Card ---------- */
.pengawasan-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.pengawasan-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.pengawasan-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}

.pengawasan-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pengawasan-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.pengawasan-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-lg);
    opacity: 0.7;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.empty-state-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* ---------- Floating Auto-Save Indicator ---------- */
.floating-save-indicator {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-surface);
    border: 1px solid var(--border-gold);
    color: var(--gold-300);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-fast);
}

.floating-save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Utility Helpers ---------- */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-sm { font-size: 0.85rem; }
.fs-xs { font-size: 0.75rem; }

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: var(--space-lg);
    }

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: var(--space-md);
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card-body {
        padding: var(--space-lg);
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal {
        max-width: 100%;
        margin: var(--space-md);
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: var(--space-sm);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: var(--space-md);
    }

    .btn {
        padding: 0.55rem 1.1rem;
        font-size: 0.82rem;
    }

    .check-option label {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .form-control {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
}

/* ---------- Print Media Overrides ---------- */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .card-footer {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        background: white;
    }
}

/* Mobile Hamburger Menu */
.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gold-400);
    margin: 3px 0;
    transition: all var(--transition-fast);
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .hamburger {
        display: flex;
        flex-direction: column;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

/* ==========================================
   Custom Glassmorphism Modal / Confirm Popup
   ========================================== */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 30, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: var(--space-md);
}

.custom-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-dialog {
    background: linear-gradient(135deg, rgba(26, 31, 55, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    padding: var(--space-xl);
    text-align: center;
    transform: scale(0.88) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.custom-modal-backdrop.active .custom-modal-dialog {
    transform: scale(1) translateY(0);
}

.custom-modal-icon-wrapper {
    width: 76px;
    height: 76px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #ef4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
    animation: modalPulse 2s infinite ease-in-out;
}

@keyframes modalPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.5); transform: scale(1.05); }
}

.custom-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.3px;
}

.custom-modal-message {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.custom-modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.custom-modal-actions .btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    font-size: 0.92rem;
}

