:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 20%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: var(--glass-border);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(to right, #60a5fa, #34d399);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.card-warning::before {
    background: #f59e0b;
}

.card-info::before {
    background: #3b82f6;
}

.card-success::before {
    background: #10b981;
}

.card-purple::before {
    background: #a855f7;
}

.card-danger::before {
    background: #ef4444;
}

.card:hover {
    transform: translateY(-3px);
}

.card h3 {
    margin: 0 0 10px 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card .value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #f1f5f9;
}

.card .sub-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
    font-weight: 500;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #475569;
}

.btn-secondary:hover {
    background: #64748b;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border-radius: 16px;
    border: var(--glass-border);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: var(--glass-border);
}

th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Supplier Styling */
.supplier-milla {
    color: #e879f9;
    /* Pink/Fuchsia */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(232, 121, 249, 0.3);
}

.supplier-normal {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Status Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge.info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge.sold {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    text-decoration: line-through;
    opacity: 0.7;
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #1e293b;
    border: var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: #0f172a;
    border: var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    /* Fix sizing */
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.input-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

tr {
    animation: fadeIn 0.3s ease-out forwards;
}