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

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #ecf0f1;
    --dark-text: #1f3954;
    --border-color: #ddd;
}

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

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Wrapper */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    margin-left: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Topbar (legacy) */
.topbar {
    background-color: white;
    padding: 20px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1020; /* above content */
}

.topbar h1 {
    font-size: 24px;
    color: var(--secondary-color);
    margin: 0;
}

/* Content */
.content {
    flex-grow: 1;
    padding: 30px;
}

.container-fluid {
    width: 100%;
}

/* Footer */
.footer {
    background-color: white;
    padding: 15px 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-stats {
    padding: 12px 15px;
    text-align: center;
}

.card-stats .stats-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.card-stats .stats-info h4,
.card-stats .stats-info h5 {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.card-stats .stats-info h2,
.card-stats .stats-info h3 {
    font-size: 24px;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 600;
}

/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col,
.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-auto {
    padding: 0 10px;
    margin-bottom: 20px;
}

.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col { flex: 1; }
.col-auto { flex: 0 0 auto; }

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

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

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-borderless th,
.table-borderless td {
    border: none;
}

.table-sm th,
.table-sm td {
    padding: 8px;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary { background-color: var(--primary-color); color: white; }
.badge-success { background-color: var(--success-color); color: white; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: white; }
.badge-info { background-color: var(--info-color); color: white; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.w-100 { width: 100%; }

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: var(--secondary-color);
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.d-flex {
    display: flex;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: 5px 0 0 5px;
}

.input-group .btn {
    border-radius: 0 5px 5px 0;
}

.list-group {
    list-style: none;
}

.list-group-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.list-group-item:last-child {
    border-bottom: none;
}
