:root {
    --bg-color: #1f2228;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --primary-color: #ffffff;
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --surface-subtle: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --focus-ring: rgba(59, 130, 246, 0.5);
    --error-color: #ef4444;
}

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

body {
    font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Geist', sans-serif;
    color: var(--text-color);
    line-height: 1.2;
}

.font-display {
    font-family: 'Geist Mono', monospace;
    font-weight: 300;
}

.font-mono {
    font-family: 'Geist Mono', monospace;
}

/* Base Utilities - Resetting Glassmorphism */
.glass-effect, .glass-effect-subtle {
    background: var(--surface-subtle);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border-default);
    box-shadow: none;
    border-radius: 0px;
    transition: all 0.2s ease;
}

.glass-effect:hover, .glass-effect-subtle:hover {
    border-color: var(--border-strong);
}

/* Layout Utilities */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.with-nav {
    padding-top: 48px;
    padding-bottom: 96px;
}

/* Nav & Sidebar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-default);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-left .logo a {
    text-decoration: none;
    color: var(--text-color);
}

.nav-left .logo h2 {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin: 0;
}

.nav-left .logo h2 span {
    color: var(--text-muted);
}

.menu-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.menu-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.greeting {
    font-size: 14px;
    color: var(--text-muted);
}

.greeting strong {
    color: var(--text-color);
    font-weight: 400;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    border-right: 1px solid var(--border-default);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-default);
}

.sidebar-header h3 {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-color);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

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

.sidebar-nav {
    list-style: none;
    padding: 1.5rem 1rem;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 0px;
    transition: all 0.2s;
    font-size: 14px;
}

.sidebar-nav a svg {
    color: var(--text-muted);
}

.sidebar-nav a:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav a:hover svg {
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Buttons */
.btn, .btn-primary, .btn-logout, .btn-primary-custom {
    display: inline-block;
    font-family: 'Geist Mono', monospace;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1.43;
    border-radius: 0px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    box-shadow: none;
}

.btn-primary, .btn-primary-custom {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary:hover, .btn-primary-custom:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--bg-color);
    transform: none;
    box-shadow: none;
}

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

.btn-ghost:hover {
    background: var(--surface-subtle);
}

.btn-logout {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-strong);
    padding: 8px 16px;
    font-size: 12px;
}

.btn-logout:hover {
    background: var(--surface-subtle);
    color: var(--text-color);
}

/* Cards & Containers */
.card, .stat-card {
    background: var(--surface-subtle);
    border: 1px solid var(--border-default);
    border-radius: 0px !important;
    padding: 24px;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
}

.card:hover, .stat-card:hover {
    border-color: var(--border-strong);
    transform: none !important;
    box-shadow: none !important;
}

/* Inputs & Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #1a1d23;
    border: 1px solid var(--border-strong);
    border-radius: 0px;
    color: var(--text-color) !important;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--focus-ring);
    background: var(--surface-subtle);
    color: var(--text-color) !important;
}

select.form-control,
select.form-control:focus {
    background-color: #ffffff !important;
    color: #000000 !important;
    color-scheme: light;
}

select.form-control option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper svg {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-icon-wrapper .form-control {
    padding-left: 48px;
}

/* Miscellaneous */
.text-danger {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

.error-summary {
    color: var(--error-color);
    margin-bottom: 24px;
    font-size: 14px;
    background: rgba(239, 68, 68, 0.1);
    padding: 16px;
    border-radius: 0px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Home / Dashboard Styles Override */
.home-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.fade-in-up {
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
}
