/* RR Construction Leave Management System - Matching Dashboard Style */

:root {
    --primary-red: #DC143C;
    --dark-red: #B01030;
    --light-gray: #F8F9FA;
    --border-gray: #E0E0E0;
    --text-dark: #333333;
    --text-light: #666666;
    --success-green: #28A745;
    --warning-orange: #FFA500;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-gray);
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand {
    color: var(--primary-red) !important;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px 20px;
}

.nav-link {
    color: var(--text-dark) !important;
    padding: 15px 20px !important;
    font-size: 0.95rem;
}

.nav-link.active, .nav-link:hover {
    background: var(--primary-red);
    color: white !important;
}

.navbar-text {
    padding: 15px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Welcome Section */
.welcome-section {
    background: white;
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.welcome-section h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 600;
}

.welcome-section p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: none;
    margin-bottom: 25px;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-gray);
    padding: 20px 25px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 25px;
}

/* Buttons */
.btn {
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 20, 60, 0.3);
}

.btn-secondary {
    background: #6C757D;
    color: white;
}

.btn-secondary:hover {
    background: #5A6268;
}

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

.btn-outline-secondary {
    border: 1px solid var(--border-gray);
    background: white;
    color: var(--text-dark);
}

.btn-outline-secondary:hover {
    background: var(--light-gray);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
    margin: 10px 0;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.stat-sublabel {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Table */
.table-responsive {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

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

thead {
    background: var(--light-gray);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    border-bottom: 2px solid var(--border-gray);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-gray);
    font-size: 0.9rem;
}

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

tr:hover {
    background: #FAFAFA;
}

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

.badge-pending {
    background: #FFF3CD;
    color: #856404;
}

.badge-approved {
    background: #D4EDDA;
    color: #155724;
}

.badge-rejected {
    background: #F8D7DA;
    color: #721C24;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border-left-color: var(--success-green);
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
    border-left-color: var(--primary-red);
}

.alert-info {
    background: #D1ECF1;
    color: #0C5460;
    border-left-color: #17A2B8;
}

/* Login Container */
.login-container {
    max-width: 450px;
    margin: 100px auto;
    padding: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

/* Chart Container */
.chart-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-row .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-row .form-group {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.small-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.text-danger {
    color: var(--primary-red);
}

.text-success {
    color: var(--success-green);
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

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

.d-flex {
    display: flex;
}

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

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

.gap-2 {
    gap: 0.5rem;
}