/* ============================================
   MIA SIKAPAK - CORE CSS
   One File to Rule Them All
   Theme: Emerald Islamic Green
   ============================================ */

:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #d1fae5;
    --secondary: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   1. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   2. ANTI-INSPECT SECURITY LAYER
   ============================================ */
body::before {
    content: "MIA SIKAPAK - CONFIDENTIAL";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 4rem;
    font-weight: bold;
    color: var(--text);
    opacity: 0.03;
    pointer-events: none;
    z-index: 99999;
    letter-spacing: 2rem;
    white-space: nowrap;
}

.no-select, .mia-table, .mia-card {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

input, textarea, .selectable {
    user-select: text !important;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.devtools-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #064e3b;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    padding: 2rem;
}

.devtools-blocker::before {
    content: "⚠️";
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ============================================
   3. TOAST NOTIFICATION SYSTEM
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.toast-container > * {
    pointer-events: auto;
}

.mia-toast {
    background: var(--surface);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
    min-width: 300px;
}

.mia-toast.success { border-left-color: var(--success); background: #ecfdf5; }
.mia-toast.error { border-left-color: var(--danger); background: #fef2f2; }
.mia-toast.warning { border-left-color: var(--warning); background: #fffbeb; }
.mia-toast.info { border-left-color: var(--info); background: #eff6ff; }

.mia-toast-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.mia-toast-content {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.mia-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.mia-toast-close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text);
}

.mia-toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.2;
    width: 100%;
    animation: toastProgress 4s linear forwards;
}

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

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ============================================
   4. LAYOUT & GRID SYSTEM
   ============================================ */
.main-content {
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.with-sidebar {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    padding-top: calc(var(--header-height) + 2rem);
}

.main-content.full-width {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   5. SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

.sidebar-toggle.mobile {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background: var(--surface);
    padding: 8px 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.user-info {
    margin-bottom: 12px;
    font-size: 14px;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.user-role {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--danger);
    color: white !important;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-logout:hover {
    opacity: 0.9;
}

/* ============================================
   6. TOPBAR
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 50;
}

.page-module {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* ============================================
   7. TYPOGRAPHY & UTILITIES
   ============================================ */
h1.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }

.hidden { display: none !important; }

/* ============================================
   8. BREADCRUMB
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--border);
}

/* ============================================
   9. COMPONENTS - CARDS
   ============================================ */
.mia-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.mia-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.mia-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

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

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: #dbeafe; }
.stat-icon.green { background: #d1fae5; }
.stat-icon.orange { background: #ffedd5; }
.stat-icon.red { background: #fee2e2; }

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: var(--text-light);
}

/* ============================================
   10. COMPONENTS - BUTTONS
   ============================================ */
.mia-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.mia-btn-primary {
    background: var(--primary);
    color: white;
}

.mia-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.mia-btn-danger {
    background: var(--danger);
    color: white;
}

.mia-btn-danger:hover {
    background: #dc2626;
}

.mia-btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.mia-btn-secondary:hover {
    background: var(--border);
}

.mia-btn-success {
    background: var(--success);
    color: white;
}

.mia-btn-success:hover {
    background: #059669;
}

.mia-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.mia-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.mia-btn-block {
    width: 100%;
}

/* ============================================
   11. COMPONENTS - FORMS
   ============================================ */
.mia-form-group {
    margin-bottom: 1.25rem;
}

.mia-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}

.mia-label .required {
    color: var(--danger);
    margin-left: 4px;
}

.mia-input, .mia-select, .mia-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--surface);
    color: var(--text);
}

.mia-input:focus, .mia-select:focus, .mia-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.mia-input:disabled, .mia-select:disabled {
    background: var(--bg);
    cursor: not-allowed;
}

.mia-textarea {
    min-height: 100px;
    resize: vertical;
}

.mia-input-error {
    border-color: var(--danger) !important;
}

.mia-error-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

.mia-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============================================
   12. COMPONENTS - TABLES
   ============================================ */
.mia-table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.mia-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mia-table th {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.mia-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.mia-table tr:hover {
    background: var(--bg);
}

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

.mia-table-actions {
    display: flex;
    gap: 8px;
}

.mia-table-actions .mia-btn {
    padding: 6px 10px;
    font-size: 12px;
}

/* ============================================
   13. COMPONENTS - BADGES
   ============================================ */
.mia-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.mia-badge-success { background: var(--primary-light); color: var(--primary-dark); }
.mia-badge-warning { background: #fef3c7; color: #92400e; }
.mia-badge-danger { background: #fee2e2; color: #991b1b; }
.mia-badge-info { background: #dbeafe; color: #1e40af; }

/* ============================================
   14. LOGIN PAGE SPECIFIC
   ============================================ */
.login-box {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon-large {
    font-size: 64px;
    margin-bottom: 1rem;
}

.login-logo h1 {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.login-logo p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 13px;
    color: var(--text-light);
}

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

/* ============================================
   15. FOOTER
   ============================================ */
.main-footer {
    margin-left: var(--sidebar-width);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-quote {
    font-style: italic;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* ============================================
   16. RESPONSIVE (Mobile)
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content.with-sidebar {
        margin-left: 0;
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1rem);
    }
    
    .topbar {
        left: 0;
        padding: 0 1rem;
    }
    
    .sidebar-toggle.mobile {
        display: block;
    }
    
    h1.page-title {
        font-size: 1.25rem;
    }
    
    .mia-card {
        padding: 1rem;
    }
    
    .mia-table th, .mia-table td {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .main-footer {
        margin-left: 0;
    }
    
    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* ============================================
   17. PRINT STYLES
   ============================================ */
@media print {
    .sidebar, .topbar, .btn, .no-print, .main-footer {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .mia-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body::before {
        display: none;
    }
}

/* ============================================
   18. UTILITY CLASSES
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }

.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 24px; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }


/* ============================================
   RESPONSIVE DESIGN SYSTEM - ANTI OVERLAP
   ============================================ */

/* Container Base */
.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Grid Systems */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Flex Layouts */
.flex-row { display: flex; flex-direction: row; gap: 1rem; flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; gap: 1rem; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive table {
    min-width: 600px;
    width: 100%;
}

/* Form Responsive */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Card Responsive */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   BREAKPOINT: DESKTOP LARGE (1200px+)
   ============================================ */
@media (min-width: 1200px) {
    .sidebar { width: 280px; }
    .main-content { margin-left: 280px; }
    .container-fluid { padding: 0 2rem; }
}

/* ============================================
   BREAKPOINT: TABLET (768px - 1199px)
   ============================================ */
@media (max-width: 1199px) and (min-width: 768px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    .sidebar { width: 240px; }
    .main-content { margin-left: 240px; }
    
    h1.page-title { font-size: 1.75rem; }
}

/* ============================================
   BREAKPOINT: MOBILE (< 768px)
   ============================================ */
@media (max-width: 767px) {
    /* Sidebar jadi hamburger menu */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1000;
        transition: transform 0.3s ease;
        position: fixed;
        height: 100vh;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
    
    /* Mobile Toggle Button */
    .mobile-menu-toggle {
        display: block !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--primary);
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: var(--radius);
        font-size: 1.2rem;
        cursor: pointer;
    }
    
    /* Grid jadi 1 kolom */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Page header responsive */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-actions {
        width: 100%;
        margin-top: 1rem;
    }
    
    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Typography scale down */
    h1.page-title {
        font-size: 1.5rem;
        padding-left: 3rem;
    }
    
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    /* Cards padding smaller */
    .mia-card, .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Buttons stack */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Form full width */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Table adjustments */
    .mia-table th,
    .mia-table td {
        white-space: nowrap;
        padding: 8px 12px;
    }
    
    /* Hide some columns on mobile */
    .col-hide-mobile {
        display: none;
    }
    
    /* Nav group adjustments */
    .nav-group-title {
        font-size: 0.7rem;
    }
}

/* ============================================
   BREAKPOINT: MOBILE SMALL (< 480px)
   ============================================ */
@media (max-width: 480px) {
    .container-fluid { padding: 0 0.75rem; }
    .main-content { padding: 0.75rem; padding-top: 3.5rem; }
    
    h1.page-title {
        font-size: 1.25rem;
    }
    
    /* Stats single column */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Touch friendly */
    .mia-input, .mia-btn, .btn {
        min-height: 44px;
    }
    
    /* Toast adjustments */
    .toast-container {
        right: 0;
        left: 0;
        bottom: 0;
        top: auto;
        padding: 0.5rem;
    }
    
    .mia-toast {
        min-width: auto;
        width: 100%;
    }
    
    /* Form inputs */
    .mia-input, .mia-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ============================================
   UTILITY: HIDE/SHOW PER DEVICE
   ============================================ */
.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 767px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
}

/* ============================================
   FIX SPESIFIK: NAV GROUP & BADGES
   ============================================ */
.nav-group {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.nav-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin: 0.5rem 1rem;
    display: block;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Badge styles */
.badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--warning);
    color: #000;
}

.badge-danger {
    background: var(--danger);
}

/* Fix tumpang tindih form */
.mia-form-group {
    margin-bottom: 1.5rem;
    clear: both;
}

/* Modal responsive */
@media (max-width: 767px) {
    .modal-content {
        width: 95% !important;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Anak cards */
.anak-card {
    cursor: pointer;
    transition: all 0.2s;
}

.anak-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.anak-foto {
    object-fit: cover;
}

/* Rekening card */
.rekening-card {
    transition: all 0.2s;
}

.rekening-card:hover {
    border-color: var(--primary);
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Print styles */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .btn-logout,
    .page-actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .mia-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
