:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --sidebar-width: 250px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-color);
    color: white;
    position: fixed;
    padding: 20px 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 15px 25px;
    display: block;
    transition: 0.3s;
}

.sidebar nav ul li a:hover, .sidebar nav ul li a.active {
    background: #34495e;
    color: white;
    border-left: 4px solid var(--secondary-color);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stat-item h3 { color: #7f8c8d; font-size: 0.9rem; }
.stat-item p { font-size: 1.8rem; font-weight: bold; color: var(--primary-color); }

/* Forms & Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

th { background-color: #f8f9fa; }

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.btn-primary { background: var(--secondary-color); color: white; }
.btn-success { background: var(--accent-color); color: white; }
.btn-danger { background: #e74c3c; color: white; }

/* Login Page Specific */
.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ecf0f1;
}

.login-box {
    width: 400px;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Print Invoice Styles */
@media print {
    .sidebar, .btn, .no-print { display: none !important; }
    .main-content { margin-left: 0; width: 100%; }
    .card { box-shadow: none; border: 1px solid #eee; }
}
