@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

:root,
html {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --header-bg: rgba(248, 250, 252, 0.85);
    /* Glass tint for light mode */
    --footer-bg: #f8fafc;

    --accent-amber: #f59e0b;
    --accent-blue: #38bdf8;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --border-color: rgba(0, 0, 0, 0.05);
}

:root.dark-mode,
html.dark-mode,
body.dark-mode,
.dark-mode {
    --bg-page: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --header-bg: rgba(15, 23, 42, 0.85);
    --footer-bg: #0b1121;
    --border-color: rgba(255, 255, 255, 0.05);
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Instrument Sans', sans-serif;
    background-color: var(--bg-page) !important;
    color: var(--text-main) !important;
    transition: var(--transition);
}

/* Ensure all text elements inherit theme color */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body p,
body span,
body li,
body div,
body label {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Bricolage Grotesque', sans-serif;
}

h1:focus {
    outline: none;
}

/* Layout */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--bg-dark);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--transition);
}

.content-area {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body.public-view .content-area,
.main-wrapper.public-view .content-area {
    margin-left: 0 !important;
}

/* Master Header */
.master-header {
    height: 70px;
    background: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-amber);
}

.btn-login {
    background-color: var(--accent-amber);
    color: var(--bg-dark);
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

/* Control Tower Cards */
.tower-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.accent-amber {
    color: var(--accent-amber);
}

.accent-blue {
    color: var(--accent-blue);
}

/* Theme Toggle */
.btn-theme-toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

/* Master Footer */
.master-footer {
    padding: 80px 40px 40px;
    border-top: 1px solid var(--border-color);
    background-color: var(--footer-bg);
    color: var(--text-main);
    transition: var(--transition);
}

/* Utility Class */
.high-density {
    font-size: 0.8rem;
}

/* Public Landing Styles */
.hero-section {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.8;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
}

/* Sidebar Navigation */
.sidebar-logo-container {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    border-left-color: var(--accent-amber);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-separator {
    padding: 25px 25px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

/* Dashboard Specifics */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.bg-secondary {
    background-color: #64748b;
    color: white;
}

.bg-danger {
    background-color: #ef4444;
    color: white;
}

.bg-warning {
    background-color: #f59e0b;
    color: #0f172a;
}

.bg-info {
    background-color: #38bdf8;
    color: #0f172a;
}

.bg-success {
    background-color: #10b981;
    color: white;
}