/* Government Theme Colors */
:root {
    --government-primary: #1e3c72;
    --government-secondary: #2a5298;
    --government-accent: #ffd700;
    --government-light: #f8f9ff;
    --government-dark: #163056;
}

body {
    background-color: #f4f7f6;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
}

.sidebar-government {
    background: linear-gradient(
        180deg,
        var(--government-primary) 0%,
        var(--government-secondary) 100%
    );
    box-shadow: 4px 0 15px rgba(30, 60, 114, 0.2);

    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    width: 280px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;

    padding: 20px;
}

/* Overlay pattern untuk tekstur sidebar */
.sidebar-government::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="white" opacity="0.05"/></svg>');
    opacity: 0.1;
    pointer-events: none;
}

.sidebar-government .brand-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.sidebar-government .brand-title {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-government .brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.sidebar-government .brand-text {
    color: white;
    margin-left: 0px;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Logo */
.logo-wrapper {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sidebar-government .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
}

/* Efek kilau saat hover */
.sidebar-government .nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.sidebar-government .nav-link:hover::before {
    left: 100%;
}

.sidebar-government .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateX(8px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.sidebar-government .nav-link.active {
    background: linear-gradient(
        135deg,
        var(--government-accent) 0%,
        #ffed4e 100%
    );
    color: var(--government-primary) !important;
    font-weight: 600;
    border-color: var(--government-accent);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.sidebar-government .nav-link.active i {
    color: var(--government-primary) !important;
}

.sidebar-government .nav-link i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-government hr {
    border-color: rgba(255, 255, 255, 0.3);
    margin: 20px 0;
}

.btn-government-logout {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    cursor: pointer;
}

.btn-government-logout:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Mobile Navbar Styles */
.mobile-navbar-government {
    background: linear-gradient(
        135deg,
        var(--government-primary) 0%,
        var(--government-secondary) 100%
    );
    color: white;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    border-bottom: 3px solid var(--government-accent);
}

.mobile-navbar-government .navbar-brand {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Nav section headers */
.nav-section-header {
    color: var(--government-accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px 0;
    padding-left: 16px;
}

/* User info section */
.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info .user-name {
    color: white;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-info .user-role {
    color: var(--government-accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Main Content area adjustment */
.main-content {
    transition: margin 0.3s ease;
    padding: 20px;
}

@media (min-width: 769px) {
    .main-content {
        margin-left: 280px;
    }
}

@media (max-width: 768px) {
    .navbar-collapse {
        background: linear-gradient(
            135deg,
            var(--government-primary) 0%,
            var(--government-secondary) 100%
        );
        margin-top: 10px;
        border-radius: 15px;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

/* SweetAlert Custom Styles */
.swal-government-popup {
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    padding: 2rem !important;
}
.swal-government-title {
    color: #1e3c72 !important;
    font-weight: 600 !important;
}
.swal-government-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    margin-left: 10px !important;
    font-weight: 600 !important;
}
.swal-government-cancel {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
}

/* ============================= */
/* MOBILE NAVBAR GOVERNMENT FIX */
/* ============================= */

.mobile-navbar-government {
    background: linear-gradient(
        135deg,
        var(--government-primary) 0%,
        var(--government-secondary) 100%
    );
    color: white;
    border-bottom: 3px solid var(--government-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* Brand */
.mobile-navbar-government .navbar-brand {
    color: white !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-navbar-government .navbar-brand i {
    color: white !important;
    font-size: 1.4rem;
}

/* Hamburger button */
.mobile-navbar-government .navbar-toggler {
    border: none;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 8px;
}

.mobile-navbar-government .navbar-toggler:focus {
    box-shadow: none;
}

.mobile-navbar-government .navbar-toggler-icon {
    filter: brightness(0) invert(1); /* bikin icon putih */
}

/* Collapse area */
@media (max-width: 768px) {
    .mobile-navbar-government .navbar-collapse {
        background: linear-gradient(
            180deg,
            var(--government-primary) 0%,
            var(--government-secondary) 100%
        );
        margin-top: 15px;
        border-radius: 15px;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    }

    .mobile-navbar-government .nav-link {
        color: white !important;
        font-weight: 500;
        padding: 12px 14px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-navbar-government .nav-link i {
        color: white !important;
        font-size: 1.1rem;
    }

    .mobile-navbar-government .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .mobile-navbar-government .nav-link.active {
        background: linear-gradient(
            135deg,
            var(--government-accent) 0%,
            #ffed4e 100%
        );
        color: var(--government-primary) !important;
        font-weight: 600;
    }

    .mobile-navbar-government .nav-link.active i {
        color: var(--government-primary) !important;
    }
}

/* User Info */
.mobile-user-info {
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-user-info .user-name {
    color: var(--government-accent);
    font-weight: 600;
}

.mobile-user-info .user-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* Logout button mobile */
.mobile-navbar-government .btn-government-logout {
    width: 100%;
    margin-top: 10px;
}

/* =========================
   PENGAJUAN SURAT
========================= */
body {
    background-color: #f4f7fa;
}

.container-fluid {
    padding: 20px;
}

.card-government {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card-government::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.card-government .content {
    position: relative;
    z-index: 1;
}

.filter-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 15px;
    border: 1px solid rgba(30, 60, 114, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.stats-card {
    border-radius: 15px;
    border: none;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.stats-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    pointer-events: none;
}

.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stats-card h5 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-card p {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-modern {
    border: none;
    border-radius: 12px;
    background: white;
}

.table-modern thead th {
    background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 100%);
    color: #4a5568;
    border: none;
    font-weight: 600;
    padding: 18px 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-modern tbody td {
    padding: 18px 15px;
    border: none;
    border-bottom: 1px solid #f7fafc;
    vertical-align: middle;
}

.table-modern tbody tr:hover {
    background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.badge {
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.btn-action {
    border-radius: 6px;
    padding: 8px 12px;
    margin: 0 2px;
    transition: all 0.2s ease;
    border: none;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* DataTables Custom */
.dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    width: 300px !important;
}

.page-link {
    border-radius: 6px;
    margin: 0 2px;
    color: #1e3c72;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-color: #1e3c72;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}
.fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}
/* =========================
  STATUS PENGAJUAN SURAT
========================= */
body {
    background-color: #f8f9fa;
    padding-top: 20px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.card-header h4,
.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.fw-bold {
    color: #4a4a4a;
}

.badge {
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
}

/* Simulasi warna status dari TemplateHelper */
.bg-tertunda {
    background-color: #ffc107;
    color: #ffffff;
} /* Warning */
.bg-diproses {
    background-color: #17a2b8;
    color: #fff;
} /* Info */
.bg-selesai {
    background-color: #28a745;
    color: #fff;
} /* Success */
.bg-ditolak {
    background-color: #dc3545;
    color: #fff;
} /* Danger */

hr {
    margin: 2rem 0;
    opacity: 0.1;
}

.btn {
    border-radius: 5px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-select,
.form-control {
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.form-select:focus,
.form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

.data-preview-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.data-preview-item:last-child {
    border-bottom: none;
}

/* =========================
  DETAIL PENGAJUAN SURAT
========================= */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

.card-header-blue {
    background-color: #2c4a86;
    color: white;
    border-radius: 8px 8px 0 0 !important;
    padding: 15px 20px;
}

/* Info Box Styling */
.info-box {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    height: 100%;
}

.info-label {
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0;
}

.info-value {
    font-weight: 500;
    color: #333;
    margin-bottom: 0;
}

/* Phone Box specific */
.phone-box {
    background-color: #e3f2fd;
    border: 1px solid #adc6ff;
}

/* Badge */
.badge-status {
    background-color: #e6c302;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: normal;
    font-size: 0.8rem;
}

.badge-proses {
    background-color: #42aaeb;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-selesai {
    background-color: #198754;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: normal;
    font-size: 0.8rem;
}

.section-title-line {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* Buttons */
.btn-download {
    background-color: #198754;
    color: white;
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center; /* vertikal tengah */
    justify-content: center; /* horizontal tengah */
    gap: 8px;
}
.btn-print {
    background-color: #0d6efd;
    color: white;
    width: 100%;
    display: flex;
    align-items: center; /* vertikal tengah */
    justify-content: center; /* horizontal tengah */
    gap: 8px;
}

/* Alert Box */
.doc-alert {
    background-color: #e0f7fa;
    border: none;
    color: #006064;
    font-size: 0.9rem;
}

/* Timeline */
.log-container {
    padding-left: 15px;
    border-left: 2px solid #dee2e6;
    margin-left: 10px;
    position: relative;
}
.log-item {
    position: relative;
    padding-bottom: 20px;
}
.log-item::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0d6efd;
}
.log-item.status-change::before {
    background-color: #198754;
}
.log-title {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0;
}
.log-time {
    font-size: 0.75rem;
    color: #999;
}

/* Template Form */
.form-label-custom {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0;
    display: block;
}
.form-control-custom {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 0;

    pointer-events: none;
    user-select: none;
    cursor: default;
}

.textarea-custom {
    border: 1px solid #eee;
    font-size: 0.85rem;
}

.textarea-custom:focus {
    border: 1px solid #2753a4;
    box-shadow: none;
    outline: none;
}
/* =====================================
   DATATABLES LAYOUT FIX (ADMIN STYLE)
===================================== */
.dataTables_wrapper .row {
    align-items: center;
}

/* ======================
   TOP AREA
====================== */
/* container */
.dataTables_length {
    display: flex;
    align-items: center;
}

/* PENTING: flex pada label */
.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0; /* hilangkan turun */
    font-weight: 500;
}

/* dropdown */
.dataTables_length select {
    border-radius: 10px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #dce1ea;
    background-color: #f4f6fa;
    height: 38px; /* samakan tinggi */
}

/* Hilangkan arrow dropdown bawaan */
.dataTables_length select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: none; /* extra safety */
    padding-right: 10px; /* rapikan spacing */
}

/* kanan atas (search) */
.dataTables_filter {
    display: flex;
    justify-content: flex-end;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

/* input search */
.dataTables_filter input {
    border-radius: 12px;
    border: 1px solid #dce1ea;
    background: #fbfbfc;
    padding: 8px 8px;
    width: 260px;
    transition: 0.2s;
}

.dataTables_filter input:focus {
    outline: none;
    background: #fff;
    border-color: #2c4e8a;
    box-shadow: 0 0 0 0.1rem rgba(44, 78, 138, 0.2);
}

/* ======================
   BOTTOM AREA
====================== */

/* info kiri bawah */
.dataTables_info {
    font-size: 0.95rem;
    color: #6c757d;
}

/* pagination kanan bawah */
.dataTables_paginate {
    display: flex;
    justify-content: flex-end;
}

/* active page */
.dataTables_paginate .paginate_button.current {
    background: #2c4e8a !important;
    color: #fff !important;
    border-color: #2c4e8a !important;
}

/* hover */
.dataTables_paginate .paginate_button:hover {
    background: #e9eef7 !important;
    color: #2c4e8a !important;
}

/* disable button */
.dataTables_paginate .paginate_button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Form Design */
.form-label-custom {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    text-transform: capitalize;
    margin-bottom: 4px;
    display: block;
}

.form-control-custom {
    border: 1px solid #e0e7ff;
    background-color: #f8faff;
    border-radius: 6px;
    padding: 10px 15px;
    width: 100%;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #444;
}

.form-control-custom[readonly] {
    background-color: #fdfdfd;
    border-color: #d1d9e6;
    cursor: default;
}

/* Alert Styling */
.doc-alert {
    background-color: #e0f7fa;
    border: none;
    border-left: 4px solid #00acc1;
    color: #006064;
    font-size: 0.85rem;
}

/* Styling Log Aktivitas agar sesuai gambar */
.log-container {
    position: relative;
    padding-left: 10px;
}

.log-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.log-item::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
}

.log-container::after {
    content: "";
    position: absolute;
    left: -11px;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 0;
}
