@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2e7d32;
    --primary-light: #e8f5e9;
    --primary-dark: #1b5e20;
    --text-dark: #2c3e50;
    --text-muted: #8a9bae;
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --border: #eef2f7;
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) #f0f2f5; 
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 2px solid #f0f2f5;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}

.sidebar-header .logo-text h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.sidebar-header .logo-text small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-menu-title {
    padding: 20px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar a {
    padding: 11px 20px;
    margin: 2px 12px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar a i {
    width: 20px;
    margin-right: 12px;
    font-size: 15px;
    text-align: center;
}

.sidebar a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar a.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.content {
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.topbar {
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bg-soft-success { background-color: #e8f5e9; color: #2e7d32; }
.bg-soft-info { background-color: #e3f2fd; color: #1565c0; }
.bg-soft-warning { background-color: #fff8e1; color: #f57f17; }
.bg-soft-danger { background-color: #ffebee; color: #c62828; }
.bg-soft-purple { background-color: #f3e5f5; color: #7b1fa2; }

.stat-details .stat-title { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.stat-details .stat-value { font-size: 22px; font-weight: 700; color: var(--text-dark); }

.card-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.table-custom { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-custom thead th { background-color: #fafbfd; border-bottom: 1px solid var(--border); padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; }
.table-custom tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-dark); vertical-align: middle; }
.table-custom tbody tr:last-child td { border-bottom: none; }
.table-custom tbody tr:hover { background-color: #fafbfd; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-body);
    position: relative;
}

.login-box {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border);
}

.login-choice-card {
    padding: 28px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.login-choice-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.1);
    transform: translateY(-2px);
}

.login-choice-card i { font-size: 36px; color: var(--primary); margin-bottom: 12px; }

.btn-primary-custom {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark) !important;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
    transform: translateY(-1px);
}

.btn-success-custom {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
    color: white !important;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success-custom:hover {
    background-color: #219150 !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
    transform: translateY(-1px);
}

.toggle-btn {
    display: none;
    background: var(--bg-card);
    color: var(--text-dark);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

.form-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #fafbfd;
}

.form-control:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.sale-type-tabs {
    display: flex;
    background-color: var(--bg-body);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.sale-tab {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sale-tab.active {
    background-color: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sale-tab:hover:not(.active) {
    color: var(--text-dark);
}

.ts-wrapper .ts-control {
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    background-color: #fafbfd !important;
    transition: all 0.2s ease;
    min-height: 42px !important;
}

.ts-wrapper.focus .ts-control {
    background-color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1) !important;
}

.ts-dropdown {
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08) !important;
    margin-top: 5px !important;
    z-index: 9999 !important; /* Tambahkan baris ini */
}
.ts-dropdown .option.active {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

.ts-dropdown .option {
    padding: 10px 14px !important;
    font-size: 14px !important;
}

@media (max-width: 768px) {
    .sidebar { left: -260px; box-shadow: none; }
    .sidebar.active { left: 0; box-shadow: 2px 0 20px rgba(0,0,0,0.1); }
    .content { margin-left: 0; }
    .toggle-btn { display: inline-block; }
}