/* TLT Nigeria Dashboard Styles - UNESCO Blue Theme */

:root {
    --unesco-blue: #0077C8;
    --unesco-dark: #003D7A;
    --unesco-light: #4DA6E0;
    --unesco-sky: #A8D5F2;
    --midnight: #1A2332;
    --cream: #F8F9FA;
    --terracotta: #E84E0F;
    --gold: #F5A623;
    --success: #28A745;
    --shadow: rgba(0, 119, 200, 0.15);
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, #EDE4CF 100%);
    color: var(--midnight);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--unesco-dark) 0%, var(--unesco-blue) 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px var(--shadow);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--terracotta) 0%, var(--gold) 50%, var(--unesco-light) 100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header h1 {
    color: var(--cream);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    color: var(--unesco-sky);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 4px 24px var(--shadow);
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border: 2px solid rgba(0, 119, 200, 0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--unesco-dark);
    font-size: 0.95rem;
}

select {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--unesco-light);
    border-radius: 12px;
    background: white;
    color: var(--midnight);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

select:hover {
    border-color: var(--unesco-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

select:focus {
    outline: none;
    border-color: var(--unesco-dark);
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.2);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 24px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 48px rgba(10, 22, 40, 0.25);
    border-color: var(--gold);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.stat-card.blue::before {
    background: linear-gradient(90deg, var(--unesco-blue), var(--unesco-light));
}

.stat-card.green::before {
    background: linear-gradient(90deg, var(--success), #34CE57);
}

.stat-card.orange::before {
    background: linear-gradient(90deg, var(--terracotta), var(--gold));
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    box-shadow: 0 4px 16px var(--shadow);
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-dark) 100%);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, var(--success) 0%, #1E7E34 100%);
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--gold) 100%);
}

.stat-title {
    color: var(--unesco-blue);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--midnight);
    line-height: 1;
}

/* Tabs */
.tabs-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 24px var(--shadow);
    overflow: hidden;
    margin-bottom: 3rem;
}

.tabs-header {
    display: flex;
    background: linear-gradient(135deg, var(--cream) 0%, #E8F4FC 100%);
    border-bottom: 3px solid var(--unesco-blue);
    overflow-x: auto;
}

.tab-button {
    padding: 1.25rem 2rem;
    background: none;
    border: none;
    color: var(--unesco-blue);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--unesco-dark);
    background: rgba(0, 119, 200, 0.05);
}

.tab-button.active {
    color: var(--terracotta);
    background: white;
    position: relative;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta), var(--gold));
}

.tab-content {
    padding: 2.5rem;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.tab-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 119, 200, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 119, 200, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--unesco-blue);
    border: 2px solid var(--unesco-light);
}

.btn-secondary:hover {
    background: var(--cream);
    border-color: var(--unesco-blue);
}

.btn-add {
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--gold) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(232, 78, 15, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 78, 15, 0.4);
}

.btn-export {
    background: linear-gradient(135deg, var(--unesco-light) 0%, var(--unesco-blue) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(77, 166, 224, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(77, 166, 224, 0.4);
}

.btn-edit {
    background: var(--unesco-blue);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-delete {
    background: #DC3545;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: none;
}

.btn-delete.show {
    display: inline-flex;
}

/* Cards */
.card-list {
    display: grid;
    gap: 1.5rem;
}

.card {
    background: white;
    padding: 1.75rem;
    border-radius: 16px;
    border-left: 6px solid var(--unesco-blue);
    box-shadow: 0 2px 16px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 24px rgba(10, 22, 40, 0.2);
    border-left-width: 10px;
}

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

.card-title {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--midnight);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Utility classes */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.loading {
    text-align: center;
    padding: 4rem;
    color: var(--unesco-blue);
    font-size: 1.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--unesco-light);
    background: linear-gradient(135deg, var(--cream) 0%, #E8F4FC 100%);
}

.modal-title {
    color: var(--unesco-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--unesco-blue);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--unesco-blue);
    color: white;
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--unesco-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--terracotta);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--unesco-light);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--unesco-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid #eee;
    justify-content: flex-end;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: none;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}
