@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-main: #f1f5f9;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(79, 70, 229, 0.12), 0 8px 10px -6px rgba(79, 70, 229, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 3rem;
}

.navbar {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: white;
    padding: 2.2rem 1.5rem 4.5rem;
    margin-bottom: -2.5rem;
    position: relative;
    overflow: hidden;
}

.navbar::after {
    content: '';
    position: absolute;
    right: -5%;
    top: -30%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-text p {
    font-size: 0.875rem;
    color: #c7d2fe;
    font-weight: 500;
}

.status-pill {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #a7f3d0;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34d399;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.35rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-info span {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.stat-info h3 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-indigo { background: #e0e7ff; color: #4338ca; }
.stat-emerald { background: #d1fae5; color: #047857; }
.stat-cyan { background: #cffafe; color: #0e7490; }

.grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}

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

.card {
    background: var(--surface);
    padding: 1.65rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

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

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.45rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.72rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.search-box {
    position: relative;
    width: 240px;
}

@media (max-width: 560px) {
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .search-box {
        width: 100%;
    }
}

.search-box input {
    width: 100%;
    padding: 0.55rem 0.85rem 0.55rem 2.2rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    background: #f8fafc;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.72rem 1.15rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.36);
}

.btn-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--border);
    margin-top: 0.65rem;
    width: 100%;
}

.alert {
    padding: 0.95rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

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

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    text-align: left;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

table tbody tr:hover {
    background-color: #f8fafc;
}

.item-name { font-weight: 700; color: var(--text-main); }
.price-tag { font-weight: 700; color: var(--primary-dark); font-variant-numeric: tabular-nums; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-elektronik { background: #e0e7ff; color: #3730a3; }
.badge-aksesoris  { background: #fce7f3; color: #9d174d; }
.badge-jaringan   { background: #cffafe; color: #155e75; }
.badge-lainnya    { background: #f1f5f9; color: #475569; }

.stock-pill {
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
}

.stock-ok { background: #dcfce7; color: #166534; }
.stock-low { background: #fef3c7; color: #92400e; }
.stock-empty { background: #fee2e2; color: #991b1b; }

.actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem !important;
    color: var(--text-muted);
}
