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

:root {
    --bg-app: #0f172a; /* Slate 900 */
    --bg-panel: #1e293b; /* Slate 800 */
    --bg-card: #334155; /* Slate 700 */
    --primary: #0ea5e9; /* Sky Blue */
    --primary-hover: #0284c7;
    --accent-red: #f43f5e;
    --accent-green: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #475569;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.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 */
.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 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.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: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

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

/* Two Columns Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.panel-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Form Styles inside Dashboard */
.inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) 80px;
    gap: 10px;
    margin-bottom: 20px;
}

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

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

/* Tables inside cards */
.table-wrapper {
    max-height: 250px;
    overflow-y: auto;
}

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

.erp-table th, .erp-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.erp-table th {
    font-weight: 600;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    background-color: var(--bg-panel);
    z-index: 10;
}

.amount-green {
    color: var(--accent-green);
    font-weight: 600;
}

.amount-red {
    color: var(--accent-red);
    font-weight: 600;
}

footer {
    background: #090d16;
    color: var(--text-muted);
    padding: 40px 0;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@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;
    }
}
