:root {
    --primary-color: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary-color: #00796B;
    --accent-color: #81C784;
    --bg-light: #F1F8E9;
    --bg-surface: #FFFFFF;
    --text-main: #263238;
    --text-muted: #546E7A;
    --border-color: rgba(46, 125, 50, 0.25);
    --shadow-color: rgba(0, 0, 0, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === DARK THEME === */
[data-theme="dark"] {
    --bg-light: #0d1f14;
    --bg-surface: rgba(255, 255, 255, 0.07);
    --text-main: #e8f5e9;
    --text-muted: #a5d6a7;
    --border-color: rgba(114, 198, 19, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --primary-color: #72c613;
    --primary-light: #8fde28;
    --primary-dark: #5a9e0e;
    --secondary-color: #26a69a;
    --accent-color: #a5d6a7;
}

[data-theme="dark"] body,
[data-theme="dark"] .bg-pattern {
    background-color: #1a5c32;
    background-image:
        linear-gradient(135deg, #0f3d1e 0%, #1d6b38 30%, #2e9e50 55%, #1d6b38 80%, #0f3d1e 100%),
        radial-gradient(ellipse 60% 60% at 65% 40%, rgba(60, 180, 90, 0.45) 0%, transparent 70%);
    background-attachment: fixed;
}

[data-theme="dark"] .glass-card {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(114, 198, 19, 0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .assessor-header,
[data-theme="dark"] .sidebar {
    background: rgba(10, 25, 15, 0.85);
    border-color: rgba(114, 198, 19, 0.15);
    backdrop-filter: blur(16px);
}

[data-theme="dark"] .card,
[data-theme="dark"] .sa-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(114, 198, 19, 0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

[data-theme="dark"] .sa-card-footer {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(114, 198, 19, 0.2);
}

[data-theme="dark"] .sa-type-badge {
    color: #e8f5e9;
}

[data-theme="dark"] .sa-room-name {
    color: #8fde28;
}

[data-theme="dark"] .sa-area-icon {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

[data-theme="dark"] .sa-form-select-wrap {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(114, 198, 19, 0.3);
}

[data-theme="dark"] .sa-form-select-wrap svg {
    color: #8fde28;
}

[data-theme="dark"] .sa-form-select option {
    background: #1a3d24;
    color: #e8f5e9;
}

[data-theme="dark"] .nav-link {
    color: var(--text-main);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(114, 198, 19, 0.1);
}

[data-theme="dark"] .theme-toggle svg,
[data-theme="dark"] .btn-scroll-top svg {
    stroke: #72c613;
}

[data-theme="dark"] .theme-toggle:hover svg,
[data-theme="dark"] .btn-scroll-top:hover svg {
    stroke: #ffffff;
}

[data-theme="dark"] .text-gradient {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

/* Dark mode form controls */
[data-theme="dark"] .form-control {
    background: rgba(0, 0, 0, 0.4);
    color: #e8f5e9;
    border-color: rgba(114, 198, 19, 0.3);
}

[data-theme="dark"] .form-control:focus {
    border-color: #72c613;
    box-shadow: 0 0 0 3px rgba(114, 198, 19, 0.2);
}

[data-theme="dark"] select.form-control option {
    background: #1a3d24;
    color: #e8f5e9;
}

[data-theme="dark"] input.form-control::placeholder {
    color: rgba(165, 214, 167, 0.6);
}

/* === LIGHT THEME BG === */
.bg-pattern {
    background-color: #f4f6f3;
    background-image:
        radial-gradient(ellipse 80% 60% at 10% 110%, rgba(180, 220, 80, 0.55) 0%, rgba(120, 190, 60, 0.25) 45%, transparent 75%),
        radial-gradient(ellipse 50% 40% at 90% -10%, rgba(200, 230, 180, 0.3) 0%, transparent 70%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Theme Toggle and Scroll to Top Buttons */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 9999;
}

.theme-toggle,
.btn-scroll-top {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    box-shadow: 0 4px 12px var(--shadow-color);
    flex-shrink: 0;
}

.btn-scroll-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-toggle:hover,
.btn-scroll-top:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Glassmorphism */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
    gap: 0.5rem;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    filter: brightness(1.1);
}

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

.btn-secondary:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.btn-danger {
    background: linear-gradient(135deg, #ef5350, #c62828);
    color: white;
    border: 2px solid transparent;
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.btn-sm {
    height: 32px;
    padding: 0 1rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* Login Page Specific */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.footer-text {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Layout */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.flex-gap {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    gap: 1rem;
}

.nav-item:hover {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

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

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

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(46, 125, 50, 0.05);
}

/* Badge */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-warning { background: #FFF3E0; color: #E65100; }
.badge-danger { background: #FFEBEE; color: #C62828; }
.badge-info { background: #E1F5FE; color: #0277BD; }

/* Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
