/* ============================================
   ICSTI Design System — design.css
   Single Source of Truth for ALL design tokens.
   ============================================ */

/* ===========================================
   1. DESIGN TOKENS (CSS Custom Properties)
   =========================================== */
:root {
    /* — Core Colors — */
    --bg-black: #050505;
    --accent-white: #ffffff;
    --text-gray: #94a3b8;
    --input-bg: #0a0a0a;
    --placeholder-color: #52525b;

    /* — Glass / Transparency — */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-subtle: rgba(255, 255, 255, 0.02);
    --border-gray: rgba(255, 255, 255, 0.1);
    --focus-border: rgba(255, 255, 255, 0.4);
    --focus-shadow: rgba(255, 255, 255, 0.05);

    /* — Admin Theme — */
    --admin-red: #ff3b3b;
    --admin-red-hover: #e60000;
    --admin-glass-bg: rgba(20, 0, 0, 0.3);
    --admin-border: rgba(255, 50, 50, 0.2);
    --admin-focus-shadow: rgba(255, 59, 59, 0.1);
    --admin-glow: rgba(255, 59, 59, 0.4);
    --admin-ambient: rgba(255, 59, 59, 0.05);
    --admin-icon-bg: rgba(255, 59, 59, 0.1);
    --admin-icon-border: rgba(255, 59, 59, 0.3);
    --admin-placeholder-color: #3f3f46;
    --admin-card-shadow: rgba(255, 59, 59, 0.1);

    /* — Footer — */
    --footer-bg: rgba(21, 21, 21, 0.5);

    /* — Typography — */
    --font-primary: 'Inter', sans-serif;
    --font-logo: 'Axion', sans-serif;

    /* — Logo — */
    --logo-height: 144px;

    /* — Layout — */
    --content-padding: 10%;

    /* — Transitions — */
    --transition-fast: 0.3s;

    /* — Border Radius — */
    --radius-pill: 50px;
    --radius-card: 20px;
    --radius-input: 8px;
    --radius-card-lg: 16px;
    --radius-icon: 12px;
}


/* ===========================================
   2. GLOBAL RESET
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ===========================================
   3. BASE BODY STYLES
   =========================================== */
body {
    background-color: var(--bg-black);
    color: var(--accent-white);
    font-family: var(--font-primary);
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* ===========================================
   4. AMBIENT BACKGROUND (Star Canvas)
   =========================================== */
#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}


/* ===========================================
   5. NAVIGATION
   =========================================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--content-padding); /* Reduced from 2rem to 1rem */
    position: relative;
    z-index: 10;
}

.logo {
    font-weight: 700;
    font-size: 2.625rem;
    font-family: var(--font-logo);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--accent-white);
    margin-right: auto;
}

.logo img {
    height: var(--logo-height);
    width: auto;
}

.logo span {
    color: var(--text-gray);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-right: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--accent-white);
}

.nav-ctas {
    display: flex;
    gap: 1.5rem;
}


/* ===========================================
   6. BUTTONS
   =========================================== */
.btn-outline {
    border: 1px solid var(--border-gray);
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--accent-white);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-outline:hover {
    background: var(--accent-white);
    color: var(--bg-black);
}

.btn-primary {
    background: var(--accent-white);
    color: var(--bg-black);
    padding: 0.7rem 2rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid var(--accent-white);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-primary:hover {
    background: var(--bg-black);
    color: var(--accent-white);
}


/* ===========================================
   7. FORM ELEMENTS
   =========================================== */
.form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-gray);
    color: var(--accent-white);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-input);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--focus-border);
    box-shadow: 0 0 0 2px var(--focus-shadow);
}

input::placeholder,
textarea::placeholder {
    color: var(--placeholder-color);
}


/* ===========================================
   8. FOOTER
   =========================================== */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--footer-bg);
    color: var(--accent-white);
    font-size: 0.85rem;
    z-index: 10;
    position: relative;
    margin-top: auto;
    display: block;
    width: 100%;
}


/* ===========================================
   9. RESPONSIVE BREAKPOINTS
   =========================================== */
@media (max-width: 1024px) {
    .nav-links { display: none; }
}

@media (max-width: 768px) {
    .nav-ctas { display: none; }
}

/* ===========================================
   10. DASHBOARD NAVIGATION (APP HEADER)
   =========================================== */
.dash-nav {
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-gray);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dash-logo {
    font-family: var(--font-logo), sans-serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -1px;
    color: var(--accent-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-logo img {
    height: 32px !important;
    width: auto !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-white);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: var(--glass-bg);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: 1px solid var(--border-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Logout Button */
.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    color: var(--admin-red);
    background: var(--admin-ambient);
}

/* ===========================================
   SHARED SIDEBAR & LAYOUT
   =========================================== */
.dash-container {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 250px;
    background-color: #050505;
    border-right: 1px solid var(--border-gray);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 24px 12px;
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    z-index: 50;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: var(--radius-card);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-white);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-white);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.main-wrapper {
    flex: 1;
    padding: 32px 48px;
    background-color: var(--bg-black);
    margin-left: 250px;
}

.org-selector {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-white);
}

.org-name-highlight {
    color: var(--accent-white);
    font-weight: 600;
}

/* Sidebar responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        z-index: auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-gray);
        padding: 16px;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .nav-item {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .main-wrapper {
        margin-left: 0;
        padding: 20px 16px;
    }
}
