/* ============================================
   BURIMA - Bukti Tanda Terima
   Custom Styles
   Primary: Emerald Green (#10B981)
   Secondary: Yellow Glow (#FBBF24)
   ============================================ */

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

/* ---------- CSS Variables ---------- */
:root {
    --emerald-50:  #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10B981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    --yellow-50:  #fffbeb;
    --yellow-100: #fef3c7;
    --yellow-200: #fde68a;
    --yellow-300: #fcd34d;
    --yellow-400: #FBBF24;
    --yellow-500: #f59e0b;
    --yellow-600: #d97706;

    --dark-900: #0f172a;
    --dark-800: #1e293b;
    --dark-700: #334155;
    --dark-600: #475569;
    --dark-500: #64748b;
    --dark-400: #94a3b8;
    --dark-300: #cbd5e1;
    --dark-200: #e2e8f0;
    --dark-100: #f1f5f9;
    --dark-50:  #f8fafc;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --topbar-height: 64px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background: var(--dark-100);
    color: var(--dark-800);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ---------- Login Page (Split Layout) ---------- */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--dark-50);
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-700) 50%, var(--emerald-500) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #fff;
}

.login-left-content {
    position: relative;
    z-index: 10;
    max-width: 480px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.login-left-content h2 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.login-left-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--emerald-50);
    opacity: 0.9;
}

.login-orbs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.login-orbs-container .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--yellow-400);
    top: -100px;
    left: -100px;
    animation: floatOrb 10s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--emerald-300);
    bottom: -50px;
    right: -50px;
    animation: floatOrb 8s ease-in-out infinite reverse;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.2);
    top: 40%;
    left: 30%;
    animation: floatOrb 12s ease-in-out infinite 2s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.1); }
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    background: #fff;
}

.login-card {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s ease-out;
}

.login-footer-text {
    text-align: center;
    margin-top: 32px;
    font-size: 13px;
    color: var(--dark-400);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.login-logo .logo-icon i {
    font-size: 32px;
    color: #fff;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--emerald-800);
    letter-spacing: -0.5px;
}

.login-logo p {
    font-size: 14px;
    color: var(--dark-500);
    margin-top: 4px;
    font-weight: 400;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-700);
    margin-bottom: 6px;
}

.login-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-form .input-wrapper > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-400);
    font-size: 18px;
    transition: var(--transition);
    z-index: 5;
    pointer-events: none;
}

.login-form .form-control {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid var(--dark-200);
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--dark-800);
    transition: var(--transition);
    background: var(--dark-50);
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    background: #fff;
    z-index: 1;
}

.login-form .form-control:focus + i,
.login-form .input-wrapper:focus-within > i {
    color: var(--emerald-500);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-400);
    cursor: pointer;
    padding: 0;
    z-index: 5;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--emerald-600);
}

.password-toggle i {
    position: static;
    transform: none;
}


.login-form .form-control::placeholder {
    color: var(--dark-400);
}

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700));
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.login-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shakeX 0.4s ease-out;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.login-alert.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-alert.alert-success {
    background: var(--emerald-50);
    color: var(--emerald-800);
    border: 1px solid var(--emerald-200);
}

/* ---------- Layout ---------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar (Desktop) ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--emerald-800);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sidebar-brand .brand-icon i {
    font-size: 20px;
    color: #fff;
}

.sidebar-brand .brand-text h2 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.sidebar-brand .brand-text span {
    font-size: 11px;
    color: var(--emerald-300);
    font-weight: 400;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.menu-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--emerald-300);
    padding: 12px 12px 6px;
    opacity: 0.8;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: var(--transition);
    position: relative;
}

.menu-item i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
    color: var(--dark-900);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
    font-weight: 700;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #fff;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-900);
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

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

.sidebar-footer .user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .user-info .role {
    font-size: 11px;
    color: var(--emerald-200);
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-width: 0;
}

/* ---------- Topbar ---------- */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--dark-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left .page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-800);
}

.topbar-left .breadcrumb-text {
    font-size: 13px;
    color: var(--dark-500);
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--dark-600);
    cursor: pointer;
    padding: 4px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right .btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-600);
    border: 1px solid var(--dark-200);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.topbar-right .btn-logout:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* ---------- Page Content ---------- */
.page-content {
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

/* ---------- Stats Cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--dark-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    opacity: 0.04;
    border-radius: 0 16px 16px 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card .stat-icon.emerald {
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.stat-card .stat-icon.yellow {
    background: var(--yellow-50);
    color: var(--yellow-600);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}

.stat-card .stat-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.stat-card .stat-icon.purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.stat-info .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark-900);
    line-height: 1;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--dark-500);
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- Content Cards ---------- */
.content-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--dark-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 24px;
    width: 100%;
}

.content-card .card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--dark-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.content-card .card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-card .card-header h3 i {
    color: var(--emerald-500);
}

.content-card .card-body {
    padding: 24px;
}

/* ---------- Buttons ---------- */
.btn-emerald {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700));
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

.btn-yellow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
    color: var(--dark-900);
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.3);
}

.btn-yellow:hover {
    background: linear-gradient(135deg, var(--yellow-500), var(--yellow-600));
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.5);
    transform: translateY(-1px);
    color: var(--dark-900);
}

.btn-outline-emerald {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: transparent;
    color: var(--emerald-600);
    border: 2px solid var(--emerald-200);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-emerald:hover {
    background: var(--emerald-50);
    border-color: var(--emerald-400);
    color: var(--emerald-700);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-danger-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger-sm:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-edit-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--yellow-50);
    color: var(--yellow-600);
    border: 1px solid var(--yellow-200);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit-sm:hover {
    background: var(--yellow-400);
    color: var(--dark-900);
    border-color: var(--yellow-400);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

/* ---------- Table ---------- */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-500);
    background: var(--dark-50);
    border-bottom: 2px solid var(--dark-200);
    white-space: nowrap;
    text-align: left;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--dark-700);
    border-bottom: 1px solid var(--dark-100);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--emerald-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell .avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-cell .user-name {
    font-weight: 600;
    color: var(--dark-800);
}

.user-cell .user-username {
    font-size: 12px;
    color: var(--dark-500);
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-admin {
    background: var(--emerald-50);
    color: var(--emerald-700);
    border: 1px solid var(--emerald-200);
}

.badge-kepala {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-katim {
    background: var(--yellow-50);
    color: var(--yellow-600);
    border: 1px solid var(--yellow-200);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.badge-pegawai {
    background: var(--dark-100);
    color: var(--dark-600);
    border: 1px solid var(--dark-200);
}

.badge-penempatan {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

/* ---------- Form styles ---------- */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-700);
    margin-bottom: 6px;
}

.form-group .form-control,
.form-group .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--dark-200);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--dark-800);
    transition: var(--transition);
    background: #fff;
}

.form-group .form-control:focus,
.form-group .form-select:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* ---------- Modals ---------- */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--dark-200);
    background: var(--dark-50);
    border-radius: 16px 16px 0 0;
}

.modal-header .modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header .modal-title i {
    color: var(--emerald-500);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--dark-200);
    gap: 8px;
}

/* ---------- Search & Filter ---------- */
.search-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-400);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 2px solid var(--dark-200);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--dark-800);
    transition: var(--transition);
    background: #fff;
}

.search-box input:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.filter-select {
    padding: 9px 14px;
    border: 2px solid var(--dark-200);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--dark-800);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--emerald-500);
}

/* ---------- Pagination ---------- */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--dark-200);
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--dark-500);
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-600);
    background: #fff;
    border: 1px solid var(--dark-200);
    cursor: pointer;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--emerald-50);
    border-color: var(--emerald-300);
    color: var(--emerald-600);
}

.pagination .page-link.active {
    background: var(--emerald-500);
    color: #fff;
    border-color: var(--emerald-500);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 48px;
    color: var(--dark-300);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    color: var(--dark-600);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--dark-400);
}

/* ---------- Bottom Navigation (Mobile) ---------- */
.nav-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--dark-200);
    z-index: 1040;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.nav-bottom-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: var(--dark-400);
    font-size: 10px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    border-radius: 12px;
    min-width: 64px;
}

.nav-bottom-item i {
    font-size: 20px;
    margin-bottom: 2px;
    transition: var(--transition);
}

.nav-bottom-item.active {
    color: var(--emerald-600);
}

.nav-bottom-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--emerald-500);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.nav-bottom-item:hover {
    color: var(--emerald-500);
}

/* ---------- Sidebar Overlay (Mobile) ---------- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Welcome Card ---------- */
.welcome-card {
    background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-800) 100%);
    border-radius: 16px;
    padding: 32px;
    color: #fff;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 70%);
    border-radius: 50%;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 30%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    border-radius: 50%;
}

.welcome-card h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.welcome-card p {
    font-size: 14px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.welcome-card .welcome-date {
    font-size: 13px;
    color: var(--yellow-300);
    margin-top: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ---------- Activity Item ---------- */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--dark-100);
}

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

.activity-item .activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-item .activity-text {
    font-size: 13px;
    color: var(--dark-700);
    line-height: 1.5;
}

.activity-item .activity-time {
    font-size: 11px;
    color: var(--dark-400);
    margin-top: 2px;
}

/* ---------- Toast Notification ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-notification {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-left: 4px solid var(--emerald-500);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    margin-bottom: 8px;
}

.toast-notification.toast-error {
    border-left-color: #dc2626;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    /* Media Query Max Width 768px */
    .login-wrapper {
        flex-direction: column;
    }

    .login-left {
        flex: none;
        padding: 40px 24px;
        text-align: center;
    }

    .login-left-content h2 {
        font-size: 28px;
    }

    .login-right {
        padding: 24px;
        border-radius: 24px 24px 0 0;
        margin-top: -24px;
        z-index: 20;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
    }

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

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

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

    .btn-sidebar-toggle {
        display: block;
    }

    .nav-bottom {
        display: block;
    }

    .page-content {
        padding-bottom: 80px;
    }

    .topbar-right .btn-logout .logout-text {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 16px;
        padding-bottom: 80px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat-info .stat-value {
        font-size: 22px;
    }

    .welcome-card {
        padding: 24px;
    }

    .welcome-card h2 {
        font-size: 20px;
    }

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

    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .content-card .card-header {
        padding: 16px;
    }

    .content-card .card-body {
        padding: 16px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 10px 12px;
    }

    .login-card {
        margin: 16px;
        padding: 32px 24px;
    }
}

@media (max-width: 575.98px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-content {
        padding: 16px;
        padding-bottom: 80px;
    }

    .topbar-left .page-title {
        font-size: 15px;
    }
}

/* ---------- Mobile Card View ---------- */
.mobile-cards {
    display: none;
    padding: 12px;
}

.mobile-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--dark-200);
    padding: 16px;
    margin-bottom: 10px;
    transition: var(--transition);
    position: relative;
}

.mobile-card:last-child {
    margin-bottom: 0;
}

.mobile-card:active {
    background: var(--emerald-50);
}

.mobile-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mobile-card-top .mc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
}

.mobile-card-top .mc-avatar.yellow {
    background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
    color: var(--dark-900);
}

.mobile-card-top .mc-info {
    flex: 1;
    min-width: 0;
}

.mobile-card-top .mc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mobile-card-top .mc-sub {
    font-size: 12px;
    color: var(--dark-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.mobile-card-meta .mc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--dark-50);
    color: var(--dark-600);
    border: 1px solid var(--dark-100);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-card-meta .mc-tag i {
    font-size: 11px;
    flex-shrink: 0;
}

.mobile-card-meta .mc-tag.emerald {
    background: var(--emerald-50);
    color: var(--emerald-700);
    border-color: var(--emerald-200);
}

.mobile-card-meta .mc-tag.yellow {
    background: var(--yellow-50);
    color: var(--yellow-600);
    border-color: var(--yellow-200);
}

.mobile-card-meta .mc-tag.purple {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
}

.mobile-card-meta .mc-tag.blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.mobile-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--dark-500);
    padding: 3px 0;
}

.mobile-card-row i {
    width: 16px;
    text-align: center;
    color: var(--dark-400);
    flex-shrink: 0;
}

.mobile-card-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--dark-100);
    flex-wrap: wrap;
}

.mobile-card-actions .mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.mobile-card-actions .mc-btn.primary {
    background: var(--emerald-50);
    color: var(--emerald-700);
    border: 1px solid var(--emerald-200);
}

.mobile-card-actions .mc-btn.warning {
    background: var(--yellow-50);
    color: var(--yellow-600);
    border: 1px solid var(--yellow-200);
}

.mobile-card-actions .mc-btn.danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.mobile-card-actions .mc-btn.primary:hover {
    background: var(--emerald-500);
    color: #fff;
}

.mobile-card-actions .mc-btn.warning:hover {
    background: var(--yellow-400);
    color: var(--dark-900);
}

.mobile-card-actions .mc-btn.danger:hover {
    background: #dc2626;
    color: #fff;
}

.mobile-card-images {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.mobile-card-images img {
    border-radius: 6px;
    border: 1px solid var(--dark-200);
    object-fit: cover;
    cursor: pointer;
}

.mobile-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--dark-400);
}

.mobile-empty i {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
    color: var(--dark-300);
}

.mobile-empty p {
    font-size: 13px;
    margin: 0;
}

/* Show/hide table vs cards on mobile */
@media (max-width: 767.98px) {
    .table-responsive {
        display: none !important;
    }

    .mobile-cards {
        display: block;
    }
}

/* ---------- Detail Page ---------- */
.detail-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-hero-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-hero-info {
    flex: 1;
    min-width: 0;
}

.detail-hero-info h2 {
    font-size: 20px;
    margin-bottom: 2px;
    word-break: break-word;
}

.detail-hero-info p {
    opacity: 0.8;
    font-size: 13px;
}

.detail-list {
    width: 100%;
}

.detail-item {
    display: flex;
    border-bottom: 1px solid var(--dark-100);
}

.detail-label {
    padding: 14px 24px;
    width: 160px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-500);
}

.detail-value {
    padding: 14px 24px;
    font-size: 14px;
    color: var(--dark-800);
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.detail-coord {
    font-family: monospace;
    font-size: 12px;
    background: var(--dark-50);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
    word-break: break-all;
}

/* ---------- Detail Page Mobile ---------- */
@media (max-width: 767.98px) {
    .detail-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .detail-hero-icon {
        width: 44px;
        height: 44px;
    }

    .detail-hero-icon i {
        font-size: 20px !important;
    }

    .detail-hero-info h2 {
        font-size: 17px;
    }

    .detail-item {
        flex-direction: column;
    }

    .detail-label {
        width: 100%;
        padding: 10px 16px 0;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .detail-value {
        padding: 4px 16px 12px;
        font-size: 14px;
    }

    .detail-coord {
        font-size: 11px;
        display: block;
        margin-bottom: 6px;
    }

    .search-filter-wrapper {
        padding: 12px 16px !important;
    }
}

/* ---------- Utilities ---------- */
.text-emerald { color: var(--emerald-600); }
.text-yellow { color: var(--yellow-500); }
.text-muted { color: var(--dark-500); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--dark-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-400);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-400);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--emerald-500);
}
