/* 
 * Bill Management System (BMS) - Modern Theme
 * Inspired by the provided UI reference.
 */

:root {
    --primary-color: #7d33ff; /* Vibrant Purple */
    --primary-light: #9d66ff;
    --primary-dark: #5e1fd1;
    --background-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --sidebar-bg: #7d33ff;
    --sidebar-text: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 1000;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.sidebar-nav li {
    padding: 0.5rem 2rem;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 500;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

/* Main Table Container */
.content-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Table Styling */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid #eee;
    color: var(--text-muted);
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Badge Styling */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-paid { background: #e8f5e9; color: #2e7d32; }
.badge-unpaid { background: #ffebee; color: #c62828; }
.badge-dispute { background: #fff3e0; color: #ef6c00; }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
.form-control { width: 100%; padding: 0.8rem; border-radius: 8px; border: 1px solid #ddd; outline: none; transition: 0.3s; }
.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 5px rgba(125, 51, 255, 0.2); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar-logo, .sidebar-nav a span { display: none; }
    .main-content { margin-left: 70px; }
}
