/* ============================================
   IMAFT - Unified Design System
   Pertamina Invenvation
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #004c99;
    --primary-light: #0066cc;
    --primary-lighter: #e6f0ff;
    --primary-dark: #003366;

    /* Accent */
    --accent: #D4ED78;
    --accent-dark: #b8d44e;
    --accent-light: #F0F9D8;

    /* Neutrals */
    --bg-body: #f4f6fa;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f0f4f7;

    /* Text */
    --text-primary: #1a2332;
    --text-secondary: #495057;
    --text-muted: #8a94a6;
    --text-white: #ffffff;

    /* Status */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Layout */
    --sidebar-width: 240px;
    --header-height: 64px;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* ============================================
   BASE RESET
   ============================================ */
html {
    font-size: 13px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html { font-size: 13.5px; }
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary { color: var(--primary) !important; }

.fade-out {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}
.fade-out.hide { opacity: 0; }

.fade-in {
    opacity: 0;
    animation: fadeIn 0.35s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Page title */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   BUTTONS - Unified
   ============================================ */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(0, 76, 153, 0.25);
}

.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.01em;
    padding: 0.4rem 0.9rem;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.4rem 1rem;
    transition: var(--transition);
}
.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-light {
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-secondary);
}
.btn-light:hover {
    background-color: var(--bg-body);
    border-color: #adb5bd;
}

.btn-outline-secondary {
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   FORM CONTROLS - Unified
   ============================================ */
.form-control, .form-select {
    font-family: 'Inter', sans-serif;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    transition: var(--transition);
    font-size: 0.82rem;
    color: var(--text-primary);
    background-color: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 76, 153, 0.08);
}
.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

/* ============================================
   MODAL - Unified
   ============================================ */
.modal-content {
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
    background-color: #fafbfc;
}
.modal-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.modal-body {
    padding: 1.25rem;
}
.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 0.75rem 1.25rem;
    background-color: #fafbfc;
}

/* ============================================
   TABLE - Unified
   ============================================ */
.table-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table {
    font-family: 'Inter', sans-serif;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 10px 14px;
    vertical-align: middle;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.table tbody tr:hover {
    background-color: #f8fafd;
}
.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody td {
    vertical-align: middle;
    padding: 9px 14px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    border-style: none !important;
}

/* ============================================
   BADGES - Unified Status
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.status-badge.ambil {
    background-color: #fef3cd;
    color: #92600a;
}
.status-badge.bebas {
    background-color: #d1fae5;
    color: #065f46;
}
.status-badge.pinjam {
    background-color: #fee2e2;
    color: #991b1b;
}
.status-badge.kembali {
    background-color: #e6f7d2;
    color: #3d7a0a;
}

/* ============================================
   CARDS - Unified
   ============================================ */
.widget-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.widget-card:hover {
    box-shadow: var(--shadow-md);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.empty-state .lead {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.empty-state .text-muted {
    font-size: 0.8rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-color: var(--border-color);
    padding: 0.3rem 0.6rem;
}
.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================
   MOBILE RESPONSIVE - Global
   ============================================ */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .btn {
        font-size: 0.78rem;
        padding: 0.35rem 0.75rem;
    }

    .btn-primary {
        padding: 0.35rem 0.85rem;
    }

    .form-control, .form-select {
        font-size: 0.78rem;
        padding: 0.38rem 0.65rem;
    }

    .form-label {
        font-size: 0.74rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-header {
        padding: 0.85rem 1rem;
    }

    .modal-title {
        font-size: 0.88rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.65rem 1rem;
    }

    .table thead th {
        font-size: 0.66rem;
        padding: 8px 10px;
    }

    .table tbody td {
        font-size: 0.76rem;
        padding: 7px 10px;
    }

    .status-badge {
        font-size: 0.64rem;
        padding: 2px 8px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 2rem;
    }

    .empty-state .lead {
        font-size: 0.82rem;
    }

    .pagination .page-link {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12.5px;
    }

    .modal-dialog-lg,
    .modal-lg {
        max-width: 100%;
    }
}

