/* ============================================================
   TRUEVENCE DESIGN SYSTEM - LAYOUT
   ============================================================ */

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15%;
    box-sizing: border-box;
}

.login-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
}

/* Background images for portrait/landscape */
@media (orientation: portrait) {
    .login-screen {
        background-image: url('https://pub-23829b735d524cbaa428c0e9534df703.r2.dev/Portrait-Login.png');
    }
}

@media (orientation: landscape) {
    .login-screen {
        background-image: url('https://pub-23829b735d524cbaa428c0e9534df703.r2.dev/Landscape-Login.png');
    }
}

.login-form-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0;
}

.login-logo-mark,
.login-text-logo {
    display: none;
}

.login-form-wrapper h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink-900);
    margin-bottom: 3px;
    font-family: var(--font-display);
}

.login-form-wrapper p {
    font-size: 11px;
    color: var(--ink-600);
    margin-bottom: 14px;
    line-height: 1.5;
}

.login-error-new {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(197, 48, 48, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 10px;
    margin-bottom: 16px;
    width: 100%;
    text-align: left;
}

.login-field-new {
    width: 100%;
    margin-bottom: 18px;
    text-align: left;
}

.login-field-new label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-600);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1.5px solid var(--border-light);
    border-radius: 4px;
    padding: 4px 16px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-box.focused {
    border-color: var(--violet-500);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.input-box .icon-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--lavender-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.input-box .icon-box svg {
    width: 15px;
    height: 15px;
    color: var(--violet-500);
}

.input-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 11px;
    color: var(--ink-900);
    background: transparent;
    font-family: inherit;
}

.input-box input::placeholder {
    color: var(--ink-400);
}

.eye-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--ink-400);
    flex-shrink: 0;
    padding: 2px;
}

.eye-btn svg {
    width: 15px;
    height: 15px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    color: var(--ink-600);
    margin-bottom: 26px;
    width: 100%;
    text-align: left;
}

.login-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 5px;
    background: var(--violet-500);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    border: none;
}

.login-remember input[type="checkbox"]::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.signin-btn {
    width: 100%;
    padding: 17px 24px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--ink-900) 0%, var(--violet-600) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 12px 24px -8px rgba(76, 29, 149, 0.45);
    font-family: inherit;
}

.signin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -8px rgba(76, 29, 149, 0.55);
}

.signin-btn:active {
    transform: translateY(0);
}

.signin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.signin-btn svg {
    width: 17px;
    height: 17px;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand img {
    height: 28px;
    filter: brightness(0) invert(1);
}

.sidebar-brand .name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.sidebar-brand .sub {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    margin-bottom: 3px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-link svg {
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.is-active {
    background: rgba(124, 58, 237, 0.22);
    color: #fff;
}

.sidebar-link .count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 7px;
    border-radius: 999px;
}

.sidebar-foot {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--navylite));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    color: #fff;
}

.sidebar-user-info {
    min-width: 0;
}

.sidebar-user-name {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-logout {
    width: 100%;
    padding: 9px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 48, 0.5);
    z-index: 49;
    display: none;
}

.sidebar-scrim.hidden {
    display: none !important;
}

/* ============================================================
   MAIN COLUMN
   ============================================================ */
.main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(247, 247, 251, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

body.theme-dark .topbar {
    background: rgba(18, 18, 18, 0.92);
}

.topbar-title {
    font-size: 18px;
    font-weight: 800;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
}

.security-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid rgba(47, 133, 90, 0.18);
    padding: 6px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ============================================================
   PAGE
   ============================================================ */
.page {
    padding: 26px 28px 60px;
    max-width: none;
}

/* ============================================================
   OTP SECTION
   ============================================================ */
.otp-section {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.otp-section h2 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--ink-900);
}

.otp-section p {
    font-size: 12px;
    color: var(--ink-600);
    margin-bottom: 20px;
}

.otp-input-wrapper {
    margin-bottom: 20px;
}

.otp-input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    font-family: var(--font-mono);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.otp-input:focus {
    border-color: var(--violet-500);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}
