/* --- Agezedi Stock Software CSS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-app: #090d16;
    --bg-panel: #111827;
    --bg-card: #1f2937;
    --primary: #3b82f6; /* Software Blue */
    --primary-hover: #2563eb;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border: #374151;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Layout */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    flex-shrink: 0;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary);
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover, .menu-item.active {
    background-color: var(--primary);
    color: #fff;
}

/* Main Content Layout */
.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* Filter and Add */
.actions-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-panel);
    color: #fff;
    width: 300px;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    padding: 10px 20px;
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Data Table */
.data-table-wrapper {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-muted);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
}

.status-badge.normal {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.status-badge.critical {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.2s;
}

.action-btn:hover {
    color: #fff;
}

.action-btn.delete:hover {
    color: var(--accent-red);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 480px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg-app);
    color: #fff;
    font-family: inherit;
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    outline: none;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }
    .main-content {
        padding: 20px;
    }
}
