:root {
    --primary: #0a192f; /* Dark Navy */
    --secondary: #64ffda; /* Green Accent */
    --bg-light: #f4f7f6;
    --text-dark: #333;
    --white: #ffffff;
    --border: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100%;
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 40px;
}

.nav-link {
    color: #a8b2d1;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: block;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--secondary);
}

.user-info {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #233554;
    font-size: 0.9rem;
}

.role-badge {
    background-color: var(--secondary);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 5px;
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    margin-left: 290px; /* Sidebar width + padding */
    padding: 30px;
    flex: 1;
    width: 100%;
}

h1 {
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    display: inline-block;
}

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

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary);
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
}

.card .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary);
}

tr:last-child td {
    border-bottom: none;
}

.status-active, .status-paid { color: #2ecc71; font-weight: bold; }
.status-completed, .status-sent { color: #3498db; font-weight: bold; }
.status-on-hold, .status-draft { color: #f1c40f; font-weight: bold; }

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

button:hover {
    background-color: #1a2f4d;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background-color: var(--primary);
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-box h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
}

.error-msg {
    background-color: #fee;
    color: #e74c3c;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Reports */
.bar-chart {
    margin-bottom: 30px;
}
.bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.bar-label {
    width: 150px;
    font-size: 0.9rem;
}
.bar-track {
    flex: 1;
    background: #eee;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}
.bar-fill {
    background: var(--secondary); /* Green */
    height: 100%;
    border-radius: 10px;
    min-width: 5px; /* Ensures visibility */
}
.bar-value {
    margin-left: 10px;
    font-weight: bold;
    width: 50px;
}
