/* ==============================
   BASE AUTH LAYOUT
============================== */

html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    overflow-y: hidden;
}


.screen {
    height: 100svh; /* ✔️ real mobile viewport */
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}


.section-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    background: var(--bg-primary);
    padding-top: calc(40px + env(safe-area-inset-top));
    padding-left: 24px;
    padding-right: 24px;

}


.auth-inner {

    flex: 1 1 auto;
    overflow-y: auto;              /* 🔑 */
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}


.auth {
    width: 100%;

    margin: 0 auto;
    display: flex;
    flex-direction: column;

    padding: 0;
    background: var(--bg-main);
    color: var(--text-primary);
    padding-bottom: calc(0px + env(safe-area-inset-bottom)) !important;
    -webkit-overflow-scrolling: touch;
}

/* Header stays on top */
.auth-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: env(safe-area-inset-top);
    margin-bottom: 28px;
    position: sticky;
    top: 0;
}

.logo {
    height: 28px;
}


/* ==============================
  Header start
============================== */

.start-header{
    width: 100%;
    display: block;
    background: var( --text-secondary);
    height: var(--height-40);
}





/* ==============================
   VIEWS
============================== */

.auth-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* hidden views */
.hidden {
    display: none !important;
}

/* Main content area */
.auth-inner {
    flex: 1;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;

    /* IMPORTANT: NO CARD HERE (we will add later per-screen) */
    padding: 0;
    margin-bottom: 0;
 /*   padding-bottom: calc(40px + env(safe-area-inset-bottom))*/
}

/* Footer always bottom */
.auth-footer {
    margin-top: auto;
    /*padding-bottom: env(safe-area-inset-bottom);*/
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;


     padding-bottom: calc(40px + env(safe-area-inset-bottom));
}



/* Logo + Title row */
/* ===== Native Header Bar (LEFT + CENTERED) ===== */
.auth-header{
    position: sticky !important;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;              /* ვერტიკალური ცენტრი */
    justify-content: flex-start;      /* მარცხნივ */
    padding-top: calc(40px + env(safe-area-inset-top));
    padding-left: 24px;
    padding-right: 24px;
}

/* Logo + Text row */
.brand{
    display: flex;
    align-items: center;              /* ტექსტი ვერტიკალურად ცენტრში */
    gap: 5px;
}

.brand img{
    height: 40px;
    width: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand span{
    font-size: 16px;
    font-weight: 700;


    line-height: 1;                   /* ზუსტი ცენტრი */
}


/* ==============================
   TYPOGRAPHY
============================== */

h1 {
    font-size: 28px;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ==============================
   FORM ELEMENTS
============================== */

label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 16px;
}
label select,
label textarea,
label input {
    margin-top: 8px;
}
select,
textarea,
input {
    width: 100%;
    min-height: 52px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea:focus,
input:focus {
    outline: none;
    border-color: var(--btn-primary);
    box-shadow: 0 0 0 1px var(--focus-ring);
}






/* ==============================
   BUTTONS
============================== */

button {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
}

.btn-primary {
    margin-top: 16px;
    padding: 14px;
    border-radius: var(--radius);
    transition: transform 0.08s ease;


}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--input-border);
    background: transparent;
    transition: background 0.15s ease;
}

.btn-outline:active {
    background: var(--bg-soft);
}

/* ==============================
   DIVIDER
============================== */

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-secondary);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--divider);
    opacity: 0.6;
}

/* ==============================
   FOOTER & UTILS
============================== */

.auth-footer {
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.optional {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 4px;
}

.hidden {
    display: none;
}

/* ==============================
   ALERT MODAL
============================== */

.alert-backdrop {
    position: fixed;
    display: flex;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999;
}
/* hidden state */
.alert-backdrop.hidden {
    display: none;
}


.alert-backdrop.show {
    display: flex;
}

.alert-card-wrapper{
    padding: 0 !important;
}
.alert-card {
    width: 100%;
    max-width: 320px;
    background: var(--bg-main);
    border-radius: var(--radius);
    padding: 24px  ;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.alert-card p {
    padding: 0 0 16px 0;
    margin: 0;
    line-height:16px !important; ;
    font-size: 12px;
    color: var(--text-primary);
}


.alert-card {
    animation: alertIn 0.25s ease-out;
}
.alert-card a{

    width: 1rem; height: .75rem !important; font-size: 10px;
    border-radius: .75  rem !important;

}



@keyframes alertIn {
    from {
        transform: translateY(10px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}




