:root {
    --bg-main: #f0fdf4;
    --bg-secondary: #ffffff;
    --primary: #16a34a;
    --primary-hover: #15803d;
    --text-main: #1e293b;
    --text-muted: #475569;
    --border-color: #dcfce7;
    --danger: #dc2626;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Page Transitions */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

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

/* Top Nav (Public & Dashboard) */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.logo-container svg {
    fill: currentColor;
    width: 32px;
    height: 32px;
}

.logo-container h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
}

.close-modal {
    color: var(--text-muted);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-login-form input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.modal-login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 5px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.lang-selector select {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(22, 163, 74, 0.05), rgba(22, 163, 74, 0.15)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 60px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Main Layout */
.content-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.about-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 25px;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-box {
    background: var(--bg-secondary);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    padding: 12px 24px;
}

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

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.secondary-btn:hover {
    background: #f1f5f9;
}

/* Dashboard Page */
.dashboard-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.dash-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.table-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

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

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

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tr:hover td {
    background: #f8fafc;
}

.role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(22, 163, 74, 0.1);
    color: var(--primary);
}

.tabs-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.footer-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .top-nav { flex-direction: column; gap: 15px; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* Dashboard Search Mobile Enhancements */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#searchDate {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    #searchDate {
        max-width: 100%;
        padding: 14px 16px; /* slightly larger tap target on mobile */
        font-size: 1.1rem;
    }
}
