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

:root {
    --primary: #1e3a8a;        /* Deep Navy Blue */
    --primary-light: #1e40af;  /* Medium Blue */
    --accent: #2563eb;         /* Royal Blue */
    --accent-light: #3b82f6;   /* Light Accent Blue */
    --gold: #475569;           /* Slate Gray */
    --gold-light: #64748b;     /* Medium Gray */
    --bg-light: #f1f5f9;       /* Light Gray */
    --bg-card: #ffffff;        /* Pure White */
    --text-dark: #0f172a;      /* Dark Slate */
    --text-muted: #64748b;     /* Muted Slate */
    --border-color: #cbd5e1;   /* Slate Border Gray */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px -2px rgba(30, 58, 138, 0.08), 0 2px 10px -1px rgba(30, 58, 138, 0.04);
    --shadow-lg: 0 20px 40px -15px rgba(30, 58, 138, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background: rgba(30, 58, 138, 0.9) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: #ffffff !important;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 8px;
    padding: 6px 12px !important;
    border-radius: 8px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-btn-login {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.navbar-btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-1px);
}

.navbar-btn-register {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.navbar-btn-register:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

@media (max-width: 991.98px) {
    .navbar-btn-login, .navbar-btn-register {
        width: 100% !important;
        margin-top: 8px;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 14px rgba(71, 85, 105, 0.25);
    color: #ffffff;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.35);
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 24px;
    font-weight: 600;
    color: var(--text-muted);
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
    padding: 22px 26px;
    font-size: 1.15rem;
}

.card-body {
    padding: 26px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.93) 0%, rgba(23, 37, 84, 0.9) 50%, rgba(15, 23, 42, 0.85) 100%), url('../img/kantor_camat_lamasi.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: 180px 0 160px;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-image-wrapper {
    position: relative;
    display: inline-block;
}

.hero-vector-img {
    max-height: 400px;
    width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.3));
}

.badge-official {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 8px 16px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Color Subtles for official categories */
.bg-primary-subtle {
    background-color: rgba(37, 99, 235, 0.08) !important;
    color: var(--accent) !important;
}

.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
}

.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
}

.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.08) !important;
    color: #06b6d4 !important;
}

.bg-secondary-subtle {
    background-color: rgba(107, 114, 128, 0.08) !important;
    color: #6b7280 !important;
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    min-height: 135px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stats-card:hover {
    box-shadow: var(--shadow-lg);
}

.stats-card h3 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-card p {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-label {
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table thead {
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
}

.table thead th {
    padding: 16px;
    border: none;
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
}

/* Badges */
.badge-status {
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.status-pending {
    background: #e2e8f0;
    color: #475569;
}

.status-process {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-done {
    background: #1e3a8a;
    color: #ffffff;
}

/* Sidebar for dashboard */
.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding-top: 90px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .p-3 h5 {
    color: var(--text-dark) !important;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.sidebar .nav-link {
    color: var(--text-muted);
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    margin: 4px 14px;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
}

.sidebar .nav-link:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.05);
}

.sidebar .nav-link.active {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
}

.sidebar .nav-link.active i {
    color: var(--accent);
}

.content-with-sidebar {
    margin-left: 260px;
    padding: 100px 30px 40px;
    min-height: 100vh;
}

/* Dashboard Specific Top Navbar adjustment */
.content-with-sidebar .navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.content-with-sidebar .navbar-brand {
    color: var(--text-dark) !important;
}

.content-with-sidebar .navbar-nav .nav-link {
    color: var(--text-muted) !important;
}

.content-with-sidebar .navbar-nav .nav-link:hover,
.content-with-sidebar .navbar-nav .dropdown-toggle:hover {
    color: var(--accent) !important;
    background: rgba(37, 99, 235, 0.05);
}

.content-with-sidebar .navbar-nav .nav-link.dropdown-toggle {
    color: var(--text-dark) !important;
    font-weight: 700;
}

.content-with-sidebar .navbar-toggler i {
    color: var(--text-dark) !important;
}

/* Welcome Hero simple & clean spacing */
.welcome-hero {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.welcome-hero h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.welcome-hero p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 4px;
}

/* Login/Register Card layout */
.login-container,
.register-container {
    max-width: 500px;
    margin: 80px auto;
    padding: 0 20px;
}

.auth-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-header h2 {
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

/* Footer styling */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer hr {
    border-color: rgba(255,255,255,0.08);
    margin: 40px 0 20px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-with-sidebar {
        margin-left: 0;
        padding: 80px 15px 20px;
    }
    
    .welcome-hero h1 {
        font-size: 2rem;
    }
    
    .stats-card h3 {
        font-size: 2rem;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .btn-primary,
    .btn-success {
        padding: 8px 18px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .btn-outline-secondary {
        padding: 8px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #15803d;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.alert-warning {
    background: #fef3c7;
    color: #b45309;
}

.alert-info {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (min-width: 769px) {
    .navbar-toggler {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .card-header.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .card-header.d-flex .btn {
        width: 100% !important;
        text-align: center !important;
    }
    .card-header.d-flex h5 {
        margin-bottom: 0 !important;
    }
    
    .table-borderless tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 8px;
    }
    .table-borderless td {
        padding: 2px 0 !important;
    }
}

/* Organization Chart Styles */
.org-chart-section {
    position: relative;
}

.org-node {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.05);
    border: 1px solid rgba(30, 58, 138, 0.08);
    padding: 20px;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.org-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.12);
    border-color: var(--accent);
}

.org-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
}

.org-node.camat::before {
    background: linear-gradient(90deg, #1e3a8a, #3b82f6);
}

.org-node.sekcam::before {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.org-node.subbag::before {
    background: linear-gradient(90deg, #4b5563, #9ca3af);
}

.org-node.seksi::before {
    background: linear-gradient(90deg, #1e40af, #3b82f6);
}

.org-node.kel-kecamatan::before {
    background: linear-gradient(90deg, #475569, #cbd5e1);
}

.org-icon {
    width: 54px;
    height: 54px;
    background: rgba(30, 58, 138, 0.05);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.35rem;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.org-node:hover .org-icon {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.1);
}

.org-role {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.org-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.org-nip {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
}

.org-separator-title {
    position: relative;
    text-align: center;
    margin: 40px 0 25px;
}

.org-separator-title span {
    background: var(--bg-light);
    padding: 0 20px;
    font-weight: 700;
    color: var(--primary-light);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 2;
}

.org-separator-title::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

/* Uniform Small Action Button Sizes */
.btn-sm {
    padding: 6px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    min-width: 90px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    box-shadow: none !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border: none;
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff;
}

