:root {
    --primary-color: #4A7BA7;
    --secondary-color: #7AB8D8;
    --accent-color: #E8F4F8;
    --dark-bg: #2c3e50;
    --light-bg: #f5f7fa;
    --text-dark: #2c3e50;
    --border-light: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f4f8 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    min-height: 100vh;
}

.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: var(--primary-color) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.navbar .nav-link {
    margin: 0 8px;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
}

.navbar .nav-link:hover {
    background-color: rgba(255,255,255,0.15);
    color: #fff !important;
}

.card {
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-header {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 10px 10px 0 0;
    border: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.form-control,
.form-select {
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 123, 167, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #3d6590;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 123, 167, 0.3);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #6fa3c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(122, 184, 216, 0.3);
}

.btn-danger {
    background: #c54d4d;
    color: white;
}

.btn-danger:hover {
    background: #a83f3f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 77, 77, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    color: #999;
    border: 1.5px solid #ddd;
}

.btn-outline-secondary:hover {
    background: #f0f0f0;
    color: #333;
}

.btn-outline-danger {
    color: #c54d4d;
    border: 1.5px solid #c54d4d;
}

.btn-outline-danger:hover {
    background: #c54d4d;
    color: white;
}

.table {
    border-collapse: collapse;
}

.table thead th {
    white-space: nowrap;
    background: var(--accent-color);
    color: var(--text-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--border-light);
    padding: 1rem;
}

.table tbody td {
    padding: 0.9rem 1rem;
    border-color: #f0f0f0;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.card-kpi {
    border: none;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}

.card-kpi::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.card-kpi .card-body {
    position: relative;
    z-index: 1;
}

.card-kpi span {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin-top: 0.5rem;
}

.card-kpi p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.text-bg-primary {
    background: var(--primary-color) !important;
}

.text-bg-success {
    background: var(--secondary-color) !important;
}

.text-bg-warning {
    background: #d4a574 !important;
}

.text-bg-danger {
    background: #c54d4d !important;
}

.badge {
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.85rem;
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(122, 184, 216, 0.1) 0%, rgba(232, 244, 248, 0.5) 100%);
    color: #4A7BA7;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(197, 77, 77, 0.1) 0%, rgba(197, 77, 77, 0.05) 100%);
    color: #8b3a3a;
}

.low-stock {
    color: #c54d4d;
    font-weight: 600;
}

.container {
    max-width: 1400px;
}

.d-flex .btn {
    margin: 0 4px;
}

.row.g-4 > [class*='col-'] {
    display: flex;
}

.row.g-4 > [class*='col-'] .card {
    width: 100%;
}

@media (max-width: 768px) {
    .card-kpi span {
        font-size: 1.8rem;
    }

    .navbar .nav-link {
        margin: 0.25rem 0;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
