/* ============================================================================
   Auth Pages — Login / Register (reseller.ba dizajn v3)
   ----------------------------------------------------------------------------
   Paleta: #F4F5FA (podloga) · #D4EAFF (ledeni akcenti) · #6C9A40 (zeleni detalji)
           #192A56 (navy). Bez bordera, blago zaobljeno, Albert Sans + Manrope.
   Svi selektori starog auth.css su zadržani — markup ostaje kompatibilan.
   ============================================================================ */

:root {
    --mist:  #F4F5FA;
    --ice:   #D4EAFF;
    --volt:  #6C9A40;   /* nekad žuta — sada brend zelena (isti naziv tokena zbog kompatibilnosti) */
    --green: #6C9A40;
    --green-hover: #5C8636;
    --green-soft:  #EDF3E5;
    --green-light: #9CCB6C;
    --navy:  #192A56;
    --navy-hover: #22397A;

    --primary: #192A56;
    --primary-dark: #22397A;
    --primary-light: #D4EAFF;
    --secondary: #22397A;
    --success: #6C9A40;
    --danger: #dc2626;

    --text-dark:  #192A56;
    --text-body:  #4E5B7A;
    --text-muted: #8A94AD;
    --text-light: #C6D3EE;

    --bg-white: #ffffff;
    --bg-light: #F4F5FA;
    --border: transparent; /* bez bordera — zadržano zbog kompatibilnosti */

    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 10px;

    --shadow-sm: 0 6px 18px -12px rgba(25, 42, 86, 0.16);
    --shadow-md: 0 14px 34px -20px rgba(25, 42, 86, 0.18);
    --shadow-lg: 0 22px 46px -22px rgba(25, 42, 86, 0.24);

    --font-body: 'Manrope', 'Albert Sans', system-ui, -apple-system, sans-serif;
    --font-display: 'Albert Sans', 'Manrope', system-ui, sans-serif;
    --transition: 0.2s ease;

    /* RU monogram iz loga kao prozirni vodeni žig (bijeli, na navy ploči) */
    --ru-mark-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120.3 100'%3E%3Cpath fill='%23FFFFFF' d='M93.6,16.2l-2.2,6c-0.1-4.4-1.6-8.6-4.2-12.4C82.9,3.6,76,0,68.3,0H30.5L0,83.7h24.7 c0.7,1.7,1.6,3.4,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0.9,2.6-2.9,4.6-5.3,5.6L62,54.3 C70.8,53.5,78.7,49.1,84.1,42.4z'/%3E%3Cpath fill='%23FFFFFF' d='M83.8,28.7l-0.9,2.6c-3.6,9.9-13.1,16.5-23.6,16.5h-2.1L54.8,54l7.7,21.1l0.8,2.2l1,2.8l0.8,2.1l3.2,8.7 c-1.7,0.2-12.5,0.3-12.5,0.3L52,80.6l-0.8-2.1l-0.5-1.5h0l-1.5,0c-1.6,0-2.5-1-2.9-1.5c-0.4-0.6-1-1.7-0.4-3.2l1.6-4.3l1.2-3.2 l3.8-10.3l0.8-2.2l1.6-4.4L59.1,36h0.7c5.2,0,9.9-3.3,11.7-8.2c0.3-0.8,0.4-1.6,0.4-2.4c0-3.8-3.1-6.9-6.9-6.9H43.4l-17,46.8 c-0.1,0.2-0.2,0.5-0.3,0.7l-3.4,9.2l-0.7,1.9H9.5L35.1,6.6h33.2c5.4,0,10.3,2.6,13.5,7C84.9,18.1,85.6,23.6,83.8,28.7z'/%3E%3C/svg%3E");
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body.auth-page { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--text-body); background: var(--mist); min-height: 100vh; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy-hover); }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--green-soft); color: var(--navy); }

/* ============================================================ AUTH CONTAINER */
.auth-container { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ============================================================ LIJEVI PANEL (navy ploča) */
.auth-left {
    background:
        radial-gradient(560px 360px at 108% 10%, rgba(212, 234, 255, 0.14), transparent 60%),
        radial-gradient(420px 320px at -6% 110%, rgba(108, 154, 64, 0.16), transparent 55%),
        var(--navy);
    padding: 40px;
    display: flex; flex-direction: column;
    overflow: hidden;
    max-height: 100vh;
    position: sticky;
    top: 0px;
}
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; }
.auth-logo i { font-size: 24px; }
.auth-logo:hover { color: #fff; }
.auth-logo .logo-img { width: 300px; height: auto; max-width: 100%; }
.auth-left-content { position: fixed; z-index: 2; bottom: 40px; max-width: 420px; }
.auth-left-content h2 { font-family: var(--font-display); font-size: 36px; font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.02em; }
.auth-left-content p { font-size: 16px; color: rgba(255, 255, 255, 0.78); line-height: 1.7; margin-bottom: 24px; }
.auth-benefits { list-style: none; }
.auth-benefits li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.9); font-size: 15px; font-weight: 500; padding: 8px 0; }
.auth-benefits li i { color: #fff; background: var(--green); border-radius: var(--radius-full); width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.auth-left-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-left-shapes::after { content: ''; position: absolute; left: -80px; top: 90%; width: 366px; height: 366px; margin-top: -183px; background: var(--ru-mark-white) center / contain no-repeat; opacity: 0.07; transform: rotate(-8deg); }
.auth-shape { position: absolute; border-radius: 50%; background: rgba(212, 234, 255, 0.07); }
.auth-shape-1 { width: 400px; height: 400px; bottom: -100px; right: -100px; }
.auth-shape-2 { width: 250px; height: 250px; top: -50px; right: 50%; background: rgba(108, 154, 64, 0.08); }

/* LANG SWITCHER AUTH (pilula na navy) */
.lang-switcher-auth { display: flex; gap: 3px; padding: 4px; background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full); }
.lang-switcher-auth .lang-btn { padding: 5px 11px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.6); border-radius: var(--radius-full); transition: all 0.2s ease; }
.lang-switcher-auth .lang-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.lang-switcher-auth .lang-btn.active { color: #fff; background: var(--green); }

/* ============================================================ DESNI PANEL (forma) */
.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--mist); }
.auth-right-scroll { align-items: flex-start; overflow-y: auto; padding-top: 48px; padding-bottom: 48px; }
.auth-form-wrapper { width: 100%; max-width: 520px; background: var(--bg-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 40px 42px; }
.auth-form-wrapper h1 { font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 26px; }

/* ============================================================ ALERTS (bez bordera) */
.alert { display: flex; gap: 12px; padding: 15px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; line-height: 1.5; }
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert p { margin: 0; }
.alert-error { background: #FDF1F1; color: #991b1b; }
.alert-error i { color: var(--danger); }
.alert-success { background: #EFFBF3; color: #166534; }
.alert-success i { color: var(--success); }
.alert-warning { background: #FFF9E8; color: #92400e; }
.alert-warning i { color: #d97706; }
.alert-warning code { display: block; margin-top: 8px; padding: 8px 12px; background: rgba(25, 42, 86, 0.06); border-radius: 8px; font-family: 'Consolas', monospace; font-size: 12px; word-break: break-all; }

/* ============================================================ FORME (bez bordera — mist polja) */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--text-dark); }
.form-group .req { color: var(--danger); }
.form-group input, .form-group textarea, .form-group select {
    font-family: var(--font-body); font-size: 14px;
    padding: 13px 16px;
    border: none; border-radius: var(--radius-sm);
    background: var(--mist); color: var(--text-dark);
    transition: background var(--transition), box-shadow var(--transition);
    outline: none; width: 100%;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { background: var(--bg-white); box-shadow: 0 0 0 3px rgba(108, 154, 64, 0.35), var(--shadow-sm); }
.form-group textarea { resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.input-icon input { padding-left: 40px; }

/* ============================================================ BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 14px; line-height: 1; padding: 14px 26px; border-radius: var(--radius-full); border: none; cursor: pointer; transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-hover); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 32px; font-size: 15px; }

/* ============================================================ AUTH FOOTER */
.auth-footer { margin-top: 22px; text-align: center; }
.auth-footer p { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.auth-footer a { font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ============================================================ ACCOUNT TYPE TOGGLE (bez bordera) */
.account-type-toggle { display: flex; gap: 10px; }
.at-option { cursor: pointer; flex: 1; }
.at-option input { display: none; }
.at-option span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; background: var(--mist); border-radius: var(--radius-sm); font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text-body); transition: all 0.2s ease; }
.at-option span i { font-size: 15px; color: var(--text-muted); transition: color 0.2s ease; }
.at-option span:hover { background: var(--ice); color: var(--navy); }
.at-option input:checked + span { background: var(--ice); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.at-option input:checked + span i { color: var(--navy); }

/* Registracija — polja po tipu naloga (company/individual) */
.account-fields { display: flex; flex-direction: column; gap: 14px; }
.account-fields[data-account] { margin: 0; }

/* ============================================================ SEARCHABLE DROPDOWN (država + telefonski kod) */
.country-slot, .phone-code-slot { position: relative; }
.ss-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; font-size: 14px; font-family: var(--font-body); color: var(--text-dark); background: var(--mist); border: none; border-radius: var(--radius-sm); cursor: pointer; text-align: left; transition: background 0.15s ease, box-shadow 0.15s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-btn span { overflow: hidden; text-overflow: ellipsis; }
.ss-btn:hover { background: var(--ice); }
.ss-btn:focus { outline: none; background: var(--bg-white); box-shadow: 0 0 0 3px rgba(108, 154, 64, 0.35), var(--shadow-sm); }
.ss-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 100%; min-width: 260px; background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; }
.ss-search { width: 100%; padding: 10px 13px; margin-bottom: 6px; font-size: 14px; font-family: var(--font-body); border: none; border-radius: 10px; background: var(--mist); }
.ss-search:focus { outline: none; background: var(--bg-white); box-shadow: 0 0 0 3px rgba(108, 154, 64, 0.35); }
.ss-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; }
.ss-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; font-size: 14px; font-family: var(--font-body); color: var(--text-dark); background: transparent; border: 0; border-radius: 10px; cursor: pointer; text-align: left; transition: background 0.15s ease; }
.ss-option:hover { background: var(--ice); }
.ss-option.active { background: var(--green-soft); color: var(--navy); font-weight: 600; }

/* Telefon: kod + broj u jednom redu */
.phone-input-group { display: grid; grid-template-columns: 45% 1fr; gap: 8px; align-items: start; }
.phone-input-group .ss-btn { padding: 13px 10px; }
.phone-input-group .ss-panel { min-width: 300px; }

/* Zastavice (flagcdn slike) u dropdownima */
.ss-flag { display: inline-block; width: 20px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(25, 42, 86, 0.1); flex-shrink: 0; }

/* Regija select — isti stil kao input */
.region-slot select { width: 100%; padding: 13px 16px; font-size: 14px; font-family: var(--font-body); color: var(--text-dark); background: var(--mist); border: none; border-radius: var(--radius-sm); cursor: pointer; }
.region-slot select:focus { outline: none; background: var(--bg-white); box-shadow: 0 0 0 3px rgba(108, 154, 64, 0.35), var(--shadow-sm); }

/* ============================================================ USPJEŠNA REGISTRACIJA */
.reg-success { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.reg-success-icon { font-size: 52px; color: var(--success); line-height: 1; }
.reg-success h1 { margin: 0; }
.reg-success-lead { font-size: 16px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.reg-success-steps { display: flex; flex-direction: column; gap: 12px; width: 100%; margin: 6px 0; }
.reg-success-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--mist); border-radius: var(--radius); }
.reg-step-icon { flex-shrink: 0; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--navy); background: var(--ice); border-radius: 13px; }
.reg-success-step strong { display: block; font-family: var(--font-display); font-size: 15px; color: var(--text-dark); margin-bottom: 4px; }
.reg-success-step p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.reg-email { font-weight: 600; color: var(--navy); word-break: break-all; }
.reg-success-note { font-size: 13px; color: #92400e; line-height: 1.55; margin: 0; padding: 13px 15px; background: #FFF9E8; border-radius: var(--radius); }
.reg-success-btn { margin-top: 4px; }

/* ============================================================ RESPONSIVE (mobilno pregledno) */
@media (max-width: 900px) {
    .auth-container { grid-template-columns: 1fr; }
    .auth-left { padding: 26px 22px 30px; min-height: 0; }
    .auth-left-content { margin: 18px 0 4px; max-width: 100%; }
    .auth-left-content h2 { font-size: 25px; }
    .auth-left-shapes::after { width: 240px; height: 200px; margin-top: -100px; right: -60px; }
    .auth-left-content p { font-size: 14.5px; margin-bottom: 14px; }
    .auth-benefits li { font-size: 14px; padding: 5px 0; }
    .auth-logo .logo-img { width: 160px; }
    .auth-right { padding: 26px 16px 40px; }
    .auth-form-wrapper { padding: 28px 22px; border-radius: 20px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .auth-left { padding: 20px 16px 24px; position: relative; top: auto;}
    .auth-left-content { position: relative; z-index: 2; margin: auto 0; max-width: 420px; bottom: auto; }
    .auth-left-content h2 { font-size: 22px; }
    .auth-form-wrapper { padding: 24px 16px; }
    .auth-form-wrapper h1 { font-size: 23px; }
    .auth-subtitle { font-size: 13.5px; }
    .account-type-toggle { flex-direction: column; gap: 8px; }
    .btn-lg { padding: 15px 22px; font-size: 14px; }
    .phone-input-group { grid-template-columns: 116px 1fr; }
    .phone-input-group .ss-panel { min-width: 0; width: calc(100vw - 64px); }
    .reg-success-icon { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
