@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --green: #1B5E20;
    --green-dark: #145218;
    --green-light: rgba(27, 94, 32, 0.08);
    --yellow: #F4E03C;
    --yellow-light: rgba(244, 224, 60, 0.2);
    --muted: #717182;
    --border: rgba(0, 0, 0, 0.1);
    --error: #d4183d;
    --blue-bg: #eff6ff;
    --blue-border: #bfdbfe;
    --blue-text: #1e3a5f;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f9fafb;
    color: #1a1a1a;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #dbe6d5 0%, #ffffff 50%, #fef8dc 100%);
    background-attachment: fixed;
}

/* Page Background Gradient */
.page-bg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg,
            rgba(27, 94, 32, 0.08) 0%,
            #ffffff 50%,
            rgba(244, 224, 60, 0.15) 100%);
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background-color: var(--green);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.header-logo {
    height: 3.5rem;
    width: 3.5rem;
    object-fit: contain;
}

.header-logo-lg {
    height: 4rem;
    width: 4rem;
    object-fit: contain;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.header-subtitle {
    font-size: 0.875rem;
    opacity: 0.85;
    margin: 0;
}

.btn-ghost-white {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: #ffffff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-ghost-white:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Cards & Accents */
.card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.border-l-green {
    border-left: 4px solid var(--green);
}

.border-l-emerald {
    border-left: 4px solid #22c55e;
}

.border-l-blue {
    border-left: 4px solid #3b82f6;
}

.border-l-yellow {
    border-left: 4px solid var(--yellow);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Tabs */
.tab-bar {
    display: flex;
    gap: 0.25rem;
    background: #ffffff;
    padding: 0.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    width: fit-content;
    flex-wrap: wrap;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}

.tab-btn:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.tab-btn.active {
    background: var(--green);
    color: #ffffff;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table tr:hover td {
    background: #f9fafb;
}

.td-id {
    font-weight: 600;
    color: var(--green);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-in {
    background: #22c55e;
    color: #fff;
}

.badge-out {
    background: #e5e7eb;
    color: #374151;
}

.badge-pct {
    background: #e5e7eb;
    color: #374151;
}

/* Form Controls & Buttons */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: #f9f9fb;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.15);
    background: #ffffff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: 0.15s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--green);
    color: #ffffff;
    width: 100%;
    padding: 0.625rem 1.25rem;
}

.btn-primary:hover {
    background-color: var(--green-dark);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    background-color: #ffffff;
    color: var(--green);
    border: 1.5px solid var(--green);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
    background-color: var(--green);
    color: #ffffff;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    width: auto;
}

/* Login Page Specifics */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(27, 94, 32, 0.05) 0%,
            #ffffff 50%,
            rgba(244, 224, 60, 0.1) 100%);
    margin: 0;
    padding: 1.5rem 0;
}

.notice-blue {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.notice-blue code {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

.error-banner {
    display: none;
    background: rgba(212, 24, 61, 0.1);
    border: 1px solid #d4183d;
    color: #d4183d;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    background-color: var(--green);
    color: #ffffff;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.875rem;
    opacity: 0.95;
}