/**
 * Custom CSS for Data Request System
 * DOST-PAGASA Inspired Light Blue Theme
 */

:root {
    /* PAGASA Color Palette */
    --primary-blue: #0077BE;
    --light-blue: #5DADE2;
    --dark-blue: #1F618D;
    --bg-light-blue: #EBF5FB;
    --text-dark: #212529;

    /* Status Colors */
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;

    /* Layout */
    --sidebar-width: 250px;
    --header-height: 70px;
}

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

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

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.3s;
}

a:hover {
    color: var(--dark-blue);
}

/* Utility Classes */
.text-primary { color: var(--primary-blue) !important; }
.bg-primary { background-color: var(--primary-blue) !important; }
.border-primary { border-color: var(--primary-blue) !important; }

/* Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 119, 190, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary-blue);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 119, 190, 0.2);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    margin-bottom: 15px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 10px 0;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table-custom {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
}

.table-custom thead th {
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: none;
}

.table-custom tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #005a93, #1a4d6e);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 190, 0.3);
    color: white;
}

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

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

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

/* Forms */
.form-control, .form-select {
    border: 2px solid #D6EAF8;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 190, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--dark-blue);
    margin-bottom: 8px;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

/* Status Badges */
.status-pending {
    background-color: #FFF3CD;
    color: #856404;
    border: 1px solid #FFE69C;
}

.status-under-review {
    background-color: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

.status-approved {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.status-rejected {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
}

.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #E9ECEF;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
    border-radius: 4px;
}

/* Charts */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 20px;
}

/* Recent Activity */
.activity-item {
    padding: 15px;
    border-left: 3px solid var(--primary-blue);
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.activity-item .activity-time {
    font-size: 12px;
    color: #6c757d;
}

.activity-item .activity-text {
    margin: 5px 0 0 0;
    color: var(--text-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
}

.empty-state i {
    font-size: 64px;
    color: #D6EAF8;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Modal */
.modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

.modal-content {
    border-radius: 10px;
    border: none;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 20px;
    }

    .table-responsive {
        font-size: 14px;
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--light-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Print Styles */
@media print {
    .sidebar, .top-navbar, .btn, .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    body {
        background: white;
    }
}
