/* ==========================================
   Login Page
   ========================================== */

.login-container {
    display: flex;
    min-height: 100vh;
    background: #131722;
}

/* Hero Side */
.login-hero {
    flex: 0 0 55%;
    background: url('/images/login-hero.jpg') center center / cover no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(19, 23, 34, 0.3) 0%, rgba(19, 23, 34, 0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.hero-brand span {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.hero-text {
    max-width: 480px;
}

.hero-text h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-text p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* Form Side */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #1e222d;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-form-header {
    margin-bottom: 2rem;
}

.login-form-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #d1d4dc;
    margin: 0 0 0.5rem;
}

.login-form-header p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #787b86;
    margin: 0;
}

/* Error */
.login-error {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: rgba(239, 83, 80, 0.12);
    border: 1px solid rgba(239, 83, 80, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: #ef5350;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

.login-error i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Fields */
.login-field {
    margin-bottom: 1.25rem;
}

.login-field label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #787b86;
    margin-bottom: 0.5rem;
}

.login-input-wrapper {
    display: flex;
    align-items: center;
    background: #131722;
    border: 1px solid #2a2e39;
    border-radius: 8px;
    padding: 0 1rem;
    transition: border-color 0.2s;
}

.login-input-wrapper:focus-within {
    border-color: #2962ff;
}

.login-input-wrapper i {
    color: #787b86;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.login-input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #d1d4dc;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    padding: 0.75rem 0.75rem;
}

.login-input-wrapper input::placeholder {
    color: #4c4f5c;
}

.password-toggle {
    background: none;
    border: none;
    color: #787b86;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: #d1d4dc;
}

/* Button */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.875rem;
    margin-top: 0.5rem;
    background: #2962ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #1e53e5;
}

.login-btn:active {
    transform: scale(0.98);
}

/* Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer a {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: #787b86;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #2962ff;
}

/* ==========================================
   Dashboard Layout — Navbar
   ========================================== */

.dash-header {
    background: #1e222d;
    border-bottom: 1px solid #2a2e39;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
}

.dash-nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.dash-brand span {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #d1d4dc;
}

.dash-nav-divider {
    width: 1px;
    height: 24px;
    background: #2a2e39;
}

.dash-nav-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #787b86;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #787b86;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.dash-nav-link:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.05);
}

.dash-nav-link-active {
    color: #26a69a;
}

.dash-nav-link-connect {
    color: #2962ff;
}

.dash-nav-link-connect:hover {
    color: #2962ff;
    background: rgba(41, 98, 255, 0.1);
}

.dash-theme-toggle {
    background: none;
    border: none;
    color: #787b86;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.dash-theme-toggle:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.05);
}

/* User Menu */
.dash-user-menu {
    position: relative;
}

.dash-user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2a2e39;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    color: #d1d4dc;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s;
}

.dash-user-badge:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dash-user-badge .fa-chevron-down {
    font-size: 0.625rem;
    color: #787b86;
}

.dash-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 200;
    overflow: hidden;
}

.dash-user-dropdown.show {
    display: block;
}

.dash-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #d1d4dc;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dash-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dash-dropdown-item i {
    color: #787b86;
    width: 16px;
    text-align: center;
}

/* ==========================================
   Dashboard Content
   ========================================== */

.dash-main {
    min-height: calc(100vh - 56px);
    background: #131722;
}

.dash-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.dash-welcome {
    margin-bottom: 2.5rem;
}

.dash-welcome h1 {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #d1d4dc;
    margin: 0 0 0.5rem;
}

.dash-welcome p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #787b86;
    margin: 0;
}

/* Dashboard Cards */
.dash-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.dash-card:hover {
    border-color: #363a45;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dash-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dash-card-icon.nse {
    background: rgba(41, 98, 255, 0.12);
    color: #2962ff;
}

.dash-card-icon.zerodha {
    background: rgba(38, 166, 154, 0.12);
    color: #26a69a;
}

.dash-card-icon.zerodha-disconnected {
    background: rgba(120, 123, 134, 0.12);
    color: #787b86;
}

.dash-card-body {
    flex: 1;
}

.dash-card-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #d1d4dc;
    margin: 0 0 0.375rem;
}

.dash-card-body p {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: #787b86;
    margin: 0;
    line-height: 1.5;
}

.dash-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.dash-status.connected {
    color: #26a69a;
}

.dash-status.connected i {
    font-size: 0.5rem;
}

.dash-status.disconnected {
    color: #787b86;
}

.dash-status.disconnected i {
    font-size: 0.5rem;
}

.dash-card-arrow {
    color: #787b86;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.dash-card:hover .dash-card-arrow {
    transform: translateX(4px);
    color: #d1d4dc;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .login-hero {
        display: none;
    }

    .login-form-panel {
        flex: 1;
    }

    .dash-nav-title {
        display: none;
    }

    .dash-nav-divider {
        display: none;
    }

    .dash-nav-link span {
        display: none;
    }

    .dash-nav-right {
        gap: 0.25rem;
    }

    .dash-user-badge span {
        display: none;
    }

    .dash-content {
        padding: 2rem 1rem;
    }

    .dash-card {
        padding: 1.25rem;
    }

    .dash-card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
}
