:root {
    --primary: #d4532f;
    --primary-dark: #b83e24;
    --secondary: #2c3e50;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --border-radius: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--light);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar-nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav a:hover {
    color: var(--primary);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

.card-header h2 {
    font-size: 20px;
    color: var(--dark);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

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

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

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

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

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

.btn-block {
    width: 100%;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 83, 47, 0.1);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th {
    background: var(--light);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid #ddd;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.table tbody tr:hover {
    background: var(--light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(212, 83, 47, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 80px auto;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--dark);
    text-align: center;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-left: 4px solid #3498db;
}

/* Loading spinner */
.spinner {
    border: 4px solid var(--light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard Grid */
.stat-box {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-box h3 {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-box .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        gap: 15px;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 15px;
    }
}

/* Tab Navigation */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--light);
    margin-bottom: 20px;
    gap: 0;
}

.tab {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab:hover {
    color: var(--dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
