@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
    --ink: #12181A;
    --ink-line: rgba(255,255,255,.09);
    --ink-text-dim: rgba(255,255,255,.56);

    --canvas: #F5F7F6;
    --surface: #FFFFFF;
    --border: #E3E7E5;
    --border-strong: #CDD3D0;

    --text: #14181A;
    --text-muted: #6C7278;
    --text-faint: #9CA1A6;

    --accent: #1E8E5A;
    --accent-strong: #146B44;
    --accent-soft: #E7F4EC;

    --danger: #C6433A;
    --danger-soft: #FBEAE8;

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --font-display: "Manrope", "Inter", sans-serif;
    --font-body: "Inter", sans-serif;
}

/* =========================================
   ВХОД
   ========================================= */

.auth-page{
    margin: 0;
    min-height: 100vh;

    background: var(--canvas);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

.auth-shell{
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 28px;
}

.auth-card{
    width: 100%;
    max-width: 400px;

    padding: 36px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: 0 20px 50px rgba(18,24,26,.06);
}

.auth-brand{
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}

.auth-heading{ margin-top: 26px; }

.auth-heading h1{
    margin: 0;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.auth-heading p{
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-error{
    margin-top: 20px;
    padding: 11px 13px;

    background: var(--danger-soft);
    color: var(--danger);

    border-radius: var(--radius-sm);

    font-size: 12px;
    font-weight: 600;
}

.auth-form{
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.auth-field{
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field > span{
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.auth-field input{
    width: 100%;
    padding: 12px 13px;

    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    outline: none;
    font: inherit;
    font-size: 13px;

    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-field input:focus{
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-remember{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;

    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

.auth-remember input{
    width: 15px; height: 15px;
    margin: 0;
    accent-color: var(--accent);
}

.auth-submit{
    width: 100%;
    margin-top: 2px;
    padding: 12px 16px;

    background: var(--accent);
    color: #ffffff;

    border: 0;
    border-radius: var(--radius-sm);

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}

.auth-submit:hover{ background: var(--accent-strong); }
.auth-submit:active{ transform: translateY(1px); }

.auth-security-note{
    margin: 20px 0 0;
    color: var(--text-faint);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}


/* =========================================
   SIDEBAR USER
   ========================================= */

.sidebar-auth-user{
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--ink-line);
}

.sidebar-auth-user-main{
    display: flex;
    align-items: center;
    gap: 9px;
}

.sidebar-auth-avatar{
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 30px; height: 30px;

    background: rgba(255,255,255,.1);
    border-radius: 9px;

    color: #fff;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
}

.sidebar-auth-user-text{
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.sidebar-auth-user-text strong{
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-auth-user-text span{
    color: var(--ink-text-dim);
    font-size: 10px;
}

.sidebar-auth-user form{ margin-top: 10px; }

.sidebar-logout-button{
    width: 100%;
    padding: 8px 10px;

    background: transparent;
    color: var(--ink-text-dim);

    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);

    font: inherit;
    font-size: 11px;
    font-weight: 500;

    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.sidebar-logout-button:hover{
    background: rgba(255,255,255,.06);
    color: #ffffff;
}


/* =========================================
   403
   ========================================= */

.auth-forbidden{
    max-width: 480px;
    padding: 32px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.auth-forbidden-code{
    color: var(--border-strong);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
}

.auth-forbidden h1{
    margin: 10px 0 8px;
    font-family: var(--font-display);
    font-size: 22px;
}

.auth-forbidden p{
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-forbidden a{
    display: inline-flex;
    margin-top: 14px;

    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-forbidden a:hover{ text-decoration: underline; }


@media (max-width: 560px){
    .auth-shell{ padding: 16px; }
    .auth-card{ padding: 25px 20px; }
}
