/* ========================================
   GLOBAL.CSS — StudentsHelper Design System
   Shared styles extracted from all pages
   ======================================== */

/* ── Design Tokens ── */
:root {
    --bg-base: #030305;
    --bg-surface: #0a0a0e;
    --bg-elevated: #111118;

    --text-primary: #ffffff;
    --text-secondary: #84849a;
    --text-tertiary: #4a4a5e;

    --accent-lime: #ccff00;
    --accent-purple: #7b42fa;
    --accent-blue: #00e5ff;

    --border-dim: rgba(255, 255, 255, 0.05);
    --border-bright: rgba(255, 255, 255, 0.15);

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --danger-red: #ff3366;
    --success-green: #ccff00;
    --warning-amber: #ffaa00;
}

/* ── Base Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

#app {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ── Ambient Background Typography ── */
.ambient-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 25vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.01);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    letter-spacing: -0.05em;
}

/* ========================================
   SIDEBAR NAVIGATION (Dashboard Pages)
   ======================================== */
.sidebar-nav {
    width: 260px;
    height: 100%;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    z-index: 20;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--text-primary);
    color: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.brand-header:hover .brand-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-lime);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.nav-menu {
    flex: 1;
    min-height: 0;
    padding: 32px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: var(--border-dim);
}

.nav-section h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding-left: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item.active {
    background: rgba(204, 255, 0, 0.05);
    color: var(--text-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 3px;
    background: var(--accent-lime);
    border-radius: 0 4px 4px 0;
}

/* Color variants for active nav items */
.nav-item.active.accent-blue {
    background: rgba(0, 229, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active.accent-blue::before {
    background: var(--accent-blue);
}

.nav-item.active.accent-purple {
    background: rgba(123, 66, 250, 0.05);
    color: var(--text-primary);
}

.nav-item.active.accent-purple::before {
    background: var(--accent-purple);
}

.nav-item:hover:not(.active) {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.nav-badge {
    margin-left: auto;
    background: var(--text-primary);
    color: var(--bg-base);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.nav-item.active .nav-badge {
    background: var(--accent-lime);
}

.nav-item.active.accent-blue .nav-badge {
    background: var(--accent-blue);
    color: var(--bg-base);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    min-height: fit-content;
}

.sidebar-footer:hover {
    background: var(--bg-elevated);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-blue);
    border: 1px solid var(--border-dim);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logout Button Hover Effect */
.sidebar-footer i[data-lucide="power"] {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    filter: drop-shadow(0 0 0px rgba(255, 51, 102, 0.5)) !important;
}

.sidebar-footer:hover i[data-lucide="power"] {
    color: #ff6699 !important;
    transform: scale(1.3) rotate(12deg) !important;
    filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.8)) !important;
}

.sidebar-footer i[data-lucide="power"]:hover {
    color: #ff99bb !important;
    transform: scale(1.5) rotate(20deg) !important;
    filter: drop-shadow(0 0 15px rgba(255, 51, 102, 1)) !important;
}

/* ========================================
   WORKSPACE LAYOUT (Main Content Area)
   ======================================== */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-base);
    position: relative;
    overflow: hidden;
}

/* Subtle grid background */
.workspace.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: 32px 32px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    z-index: 0;
    pointer-events: none;
}

.workspace-header {
    height: 85px;
    padding: 0 48px;
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.workspace-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-actions {
    display: flex;
    gap: 16px;
}

.workspace-content {
    padding: 48px;
    overflow-y: auto;
    flex: 1;
    position: relative;
    z-index: 1;
}

.workspace-content::-webkit-scrollbar {
    width: 4px;
}

.workspace-content::-webkit-scrollbar-thumb {
    background: var(--border-dim);
}

/* ========================================
   INSPECTOR PANEL (Right Sidebar)
   ======================================== */
.inspector-panel {
    width: 320px;
    height: 100%;
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    z-index: 20;
    flex-shrink: 0;
}

.inspector-header {
    padding: 32px;
    border-bottom: 1px solid var(--border-dim);
}

.inspector-header h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inspector-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.inspector-content::-webkit-scrollbar {
    width: 4px;
}

.inspector-content::-webkit-scrollbar-thumb {
    background: var(--border-dim);
}

/* ========================================
   COMMON BUTTONS
   ======================================== */
.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-primary {
    padding: 0 24px;
    height: 44px;
    border-radius: 8px;
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--accent-lime);
    border-color: var(--accent-lime);
    box-shadow: 4px 4px 0 rgba(204, 255, 0, 0.2);
    transform: translateY(-2px);
}

.btn-sys-main {
    padding: 0 24px;
    height: 44px;
    border-radius: 8px;
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sys-main:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 4px 4px 0 rgba(123, 66, 250, 0.2);
    transform: translateY(-2px);
    color: #fff;
}

.btn-icon-sys {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-sys:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-submit:hover {
    background: var(--accent-lime);
    border-color: var(--accent-lime);
    box-shadow: 4px 4px 0 rgba(204, 255, 0, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    padding: 12px 24px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: var(--danger-red);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.4);
}

/* ========================================
   COMMON FORM ELEMENTS
   ======================================== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-tertiary);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 16px 16px 16px 48px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input.no-icon,
.no-icon .form-input {
    padding-left: 16px;
}

.form-input:focus {
    border-color: var(--text-primary);
    background: transparent;
}

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

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: dashed;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.forgot-link {
    color: var(--accent-purple);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.forgot-link:hover {
    color: var(--text-primary);
}

/* ========================================
   STATUS BADGES
   ======================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active {
    background: rgba(204, 255, 0, 0.1);
    color: var(--success-green);
    border: 1px solid rgba(204, 255, 0, 0.3);
}

.status-pending {
    background: rgba(255, 170, 0, 0.1);
    color: var(--warning-amber);
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.status-done {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
}

/* ========================================
   SYSTEM BADGES & TAGS
   ======================================== */
.sys-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
}

.sys-badge.prime {
    color: var(--accent-lime);
    border-color: rgba(204, 255, 0, 0.3);
    background: rgba(204, 255, 0, 0.05);
}

.sys-tag {
    padding: 6px 12px;
    border: 1px solid var(--border-bright);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-radius: 4px;
    color: var(--text-secondary);
    background: var(--bg-elevated);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========================================
   MESSAGE FEEDBACK (Login/Register)
   ======================================== */
.message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 32px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: none;
    align-items: center;
    gap: 12px;
    border: 1px solid;
    animation: slideIn 0.3s ease;
}

.message.error {
    display: flex;
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.3);
    color: var(--danger-red);
}

.message.success {
    display: flex;
    background: rgba(204, 255, 0, 0.1);
    border-color: rgba(204, 255, 0, 0.3);
    color: var(--success-green);
}

/* ========================================
   AUTH PAGES (Login / Register) Shared
   ======================================== */
.auth-sidebar {
    width: 500px;
    height: 100%;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.auth-header {
    padding: 32px 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-dim);
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand .brand-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand:hover .brand-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-lime);
}

.brand .brand-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-content {
    flex: 1;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.auth-content::-webkit-scrollbar {
    width: 4px;
}

.auth-content::-webkit-scrollbar-thumb {
    background: var(--border-dim);
    border-radius: 4px;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 40px;
    line-height: 1.5;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.social-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-social:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-social svg {
    width: 18px;
    height: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-dim);
}

.auth-divider:not(:empty)::before {
    margin-right: 16px;
}

.auth-divider:not(:empty)::after {
    margin-left: 16px;
}

.auth-footer {
    margin-top: 32px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 2px;
}

.auth-footer a:hover {
    color: var(--accent-lime);
    border-color: var(--accent-lime);
}

/* Auth Visual Canvas (Right Side) */
.canvas {
    flex: 1;
    position: relative;
    background: var(--bg-base);
    display: flex;
    padding: 64px;
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: 4px 4px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   TERMINAL TOGGLE (Settings)
   ======================================== */
.term-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.term-toggle input {
    display: none;
}

.toggle-box {
    width: 44px;
    height: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    position: relative;
    transition: all 0.2s;
}

.toggle-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: all 0.2s;
}

.term-toggle input:checked+.toggle-box {
    border-color: var(--accent-lime);
    background: rgba(204, 255, 0, 0.1);
}

.term-toggle input:checked+.toggle-box::after {
    transform: translateX(20px);
    background: var(--accent-lime);
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.5);
}

.term-toggle input:checked~span {
    color: var(--text-primary);
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-lime);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   RESPONSIVE BREAKPOINTS (Global)
   ======================================== */

/* Hide inspector panel on medium screens */
@media (max-width: 1200px) {
    .inspector-panel {
        display: none;
    }
}

/* Collapse sidebar on small screens */
@media (max-width: 900px) {
    .sidebar-nav {
        width: 80px;
    }

    .brand-name,
    .nav-item span,
    .nav-badge,
    .user-info {
        display: none;
    }

    .workspace-header {
        padding: 0 24px;
    }

    .workspace-content {
        padding: 24px;
    }
}

/* Auth pages responsive */
@media (max-width: 1024px) {
    .canvas {
        display: none;
    }

    .auth-sidebar {
        width: 100%;
        border-right: none;
        align-items: center;
    }

    .auth-header {
        width: 100%;
        max-width: 500px;
    }

    .auth-content {
        width: 100%;
        max-width: 500px;
        padding: 32px 48px;
    }
}

@media (max-width: 480px) {
    .workspace-header {
        padding: 0 16px;
    }

    .workspace-content {
        padding: 16px;
    }

    .auth-content {
        padding: 24px;
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary, var(--text-secondary));
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.empty-state-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-tertiary, var(--text-tertiary));
    max-width: 320px;
}

/* -- Mobile Responsive Breakpoints -- */
@media (max-width: 768px) {

    /* Hide sidebar completely */
    .sidebar,
    #sidebar,
    [class*="sidebar"],
    nav.sidebar,
    .nav-sidebar,
    .side-nav,
    .sidenav {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }

    /* Remove all left offset from main content */
    body,
    .main-content {
        margin-left: 0 !important;
        padding-left: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
    }

    .content,
    .page-content,
    .workspace,
    .main-wrapper,
    .content-wrapper,
    .dashboard-content,
    main {
        margin-left: 0 !important;
        padding-left: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
    }

    .workspace-content {
        margin-left: 0 !important;
        padding-left: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
    }

    /* Make sure body doesn't overflow horizontally */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Fix any flex/grid layouts that push content right */
    .app-layout,
    .layout,
    .page-layout,
    .dashboard-layout,
    .main-layout {
        display: block !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* Hero section */
    .hero,
    .hero-section,
    .landing-hero {
        padding: 2rem 1rem !important;
        text-align: left !important;
    }

    .hero-title,
    .hero h1,
    .landing-title,
    h1.title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
    }

    .hero-subtitle,
    .hero p,
    .landing-subtitle {
        font-size: 0.95rem !important;
        max-width: 100% !important;
        padding-right: 0 !important;
    }

    /* Fix CTA buttons side by side being cut off */
    .hero-buttons,
    .cta-buttons,
    .button-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .hero-buttons a,
    .hero-buttons button,
    .cta-buttons a,
    .cta-buttons button {
        width: 100% !important;
        text-align: center !important;
    }

    /* Metric cards full width */
    .metrics-grid,
    .stats-row,
    .cards-row,
    .overview-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 0 !important;
    }

    .metric-card,
    .stat-card,
    .overview-card {
        width: 100% !important;
        min-width: unset !important;
    }

    .metrics-grid,
    .stats-grid,
    .cards-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content,
    .modal {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 1rem auto !important;
        padding: 1rem !important;
    }

    .request-card,
    .answer-card,
    .post-card {
        padding: 1rem !important;
    }

    .top-bar,
    .topbar,
    .navbar,
    header {
        padding: 0.75rem 1rem !important;
        width: 100% !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .btn,
    button {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    .hero-title,
    .page-title {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }

    .metric-value,
    .stat-number {
        font-size: 1.5rem !important;
    }
}