/* ==========================================================================
   TICK 2 BILL - PREMIUM AUTHENTICATION STYLES (GLASSMORPHISM & DARK MODE)
   ========================================================================== */

/* 1. Glavni Overlay za Prijavu */
#t2b-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    width: 100vw;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at 50% 30%, rgba(18, 25, 38, 0.94), rgba(10, 12, 16, 0.98));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999999;
    display: none;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 24px 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

#t2b-auth-overlay.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.auth-modal-open {
    overflow: hidden !important;
}

/* 2. Centralna Kartica */
.t2b-auth-card {
    background: rgba(30, 34, 45, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(3, 169, 244, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 20px 20px 24px 20px;
    color: #e4e6eb;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: auto 0 !important;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gornje kontrole na logovanju: Prekidač teme levo, Izbor jezika desno u integrisanom redu */
.auth-card-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
    position: relative;
    z-index: 25;
}

.auth-top-left-controls,
.auth-top-right-controls {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    z-index: 25;
}

/* Mikrokontrole za Jezik i Temu (Identičan dizajn kao na landing stranici) */
.nav-theme-btn {
    position: relative;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-theme-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.theme-icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.theme-icon-slot svg,
.theme-icon-svg {
    display: block;
    width: 16px;
    height: 16px;
}

.nav-micro-pill {
    position: relative;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    margin: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-micro-pill:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(56, 189, 248, 0.4);
}

.lang-globe-icon {
    color: #38bdf8;
    flex-shrink: 0;
}

.lang-code-text {
    color: #38bdf8;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    pointer-events: none;
}

.lang-selector {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01;
    cursor: pointer;
    z-index: 2;
    background: transparent;
    border: none;
    appearance: none;
}

.lang-selector option {
    background: #0b1426;
    color: #ffffff;
}

.pill-chevron {
    color: #94a3b8;
    pointer-events: none;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

#t2b-auth-overlay.active .t2b-auth-card {
    transform: translateY(0) scale(1);
}

/* 3. Brending i Zaglavlje */
.auth-brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.auth-logo-badge img,
.auth-brand-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 0;
    display: block;
}

.auth-logo-badge svg {
    width: 30px;
    height: 30px;
    stroke: #00e5ff;
}

.auth-brand-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-brand-subtitle {
    font-size: 13px;
    color: #9aa0a6;
    margin: 0;
}

/* 4. Tab Switcher (Prijava / Registracija) */
.auth-tabs {
    display: flex;
    background: rgba(18, 20, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #9aa0a6;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn:hover {
    color: #ffffff;
}

.auth-tab-btn.active {
    background: #03a9f4;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(3, 169, 244, 0.35);
}

/* 5. Google Sign-In Dugme */
.auth-google-btn-wrapper {
    margin-bottom: 20px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}

#auth-google-render-target {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    min-height: 40px;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

#auth-google-render-target > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: visible !important;
}

#auth-google-render-target iframe {
    display: block !important;
    margin: -6px -10px !important;
    max-width: none !important;
}

/* Okvir za Google zvanično dugme u tamnoj temi */
#auth-google-render-target [role="button"],
#auth-google-render-target .nsm7Bb-HzV7m-LgbsSe {
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 10px !important;
    background: #11141c !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

#auth-google-render-target .nsm7Bb-HzV7m-LgbsSe-MJoBVe {
    border: none !important;
    border-radius: 9px !important;
    background: transparent !important;
}

#auth-google-render-target [role="button"]:hover,
#auth-google-render-target .nsm7Bb-HzV7m-LgbsSe:hover {
    border-color: #03a9f4 !important;
    background: #161b26 !important;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.25) !important;
}

#auth-google-render-target .nsm7Bb-HzV7m-LgbsSe-BPrWId {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

/* Fallback dugme (kada zvanična Google biblioteka nije učitana) */
.auth-google-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px;
    height: 44px !important;
    min-height: 44px !important;
    background: #11141c !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
}

.auth-google-btn:hover {
    border-color: #03a9f4 !important;
    background: #161b26 !important;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.25) !important;
}

.auth-google-btn span {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

.auth-google-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Sakriveni Google container za zvanični One-Tap ili render button */
#g_id_onload, #g_id_signin {
    display: none;
}

/* Automatsko sakrivanje fallback dugmeta kada je zvanični Google iframe aktivan */
#auth-google-render-target:has(iframe) + #auth-btn-google,
#auth-google-render-target:not(:empty) + #auth-btn-google {
    display: none !important;
}

/* 6. Razdelnik (Divider) */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #9aa0a6;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-divider span {
    padding: 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 7. Forme i Polja */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3 !important;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    stroke: #8b949e;
    pointer-events: none;
    transition: stroke 0.2s;
}

.auth-input {
    width: 100%;
    background: #11141c !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 10px;
    padding: 12px 42px 12px 40px;
    color: #ffffff !important;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input::placeholder {
    color: #8b949e !important;
    opacity: 1;
}

.auth-input:focus {
    border-color: #03a9f4 !important;
    background: #161b26 !important;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.25) !important;
}

.auth-input:focus ~ .auth-input-icon {
    stroke: #03a9f4;
}

/* Popravka za browser autofill (Chrome/Edge/Firefox) - eliminiše beli font na beloj/žutoj autofill pozadini */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover, 
.auth-input:-webkit-autofill:focus, 
.auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #11141c inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-forgot-link {
    display: inline-block;
    font-size: 12px;
    color: #29b6f6;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-forgot-link:hover {
    color: #81d4fa;
    text-decoration: underline;
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    background: transparent !important;
    border: none !important;
    color: #80868b;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s;
}

.auth-password-toggle:hover {
    color: #ffffff;
}

.auth-password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* 8. Indikator jačine lozinke */
.password-strength-container {
    margin-top: 6px;
}

.strength-bar-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar-fill.weak {
    width: 33%;
    background-color: #f44336;
}

.strength-bar-fill.medium {
    width: 66%;
    background-color: #ff9800;
}

.strength-bar-fill.strong {
    width: 100%;
    background-color: #00e676;
}

.strength-label {
    font-size: 11px;
    color: #9aa0a6;
}

/* 9. Akciono Dugme */
.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 18px rgba(3, 169, 244, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #039be5 0%, #29b6f6 100%);
    box-shadow: 0 8px 22px rgba(3, 169, 244, 0.5);
    transform: translateY(-1px);
}

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

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 10. Poruke o greškama i uspehu */
.auth-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
    animation: authFadeIn 0.25s ease;
}

.auth-alert.show {
    display: flex;
}

.auth-alert-error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.35);
    color: #ff8a80;
}

.auth-alert-success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.35);
    color: #b9f6ca;
}

.auth-alert-info {
    background: rgba(3, 169, 244, 0.15);
    border: 1px solid rgba(3, 169, 244, 0.35);
    color: #80d8ff;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 11. Spinner za učitavanje */
.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
    display: none;
}

.auth-spinner.active {
    display: inline-block;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* 12. Korisnički Profil u Navigaciji (Header) & Odjava */
.topbar-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topbar-user-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(3, 169, 244, 0.4);
}

.topbar-user-avatar-img,
.user-avatar img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.user-avatar,
.dropdown-avatar {
    overflow: hidden !important;
    position: relative;
}

.dropdown-avatar img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.user-role-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.user-role-badge.admin {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.35);
}

.user-role-badge.user {
    background: rgba(3, 169, 244, 0.2);
    color: #4fc3f7;
    border: 1px solid rgba(3, 169, 244, 0.35);
}

.btn-logout-danger {
    color: #ff5252 !important;
    transition: background 0.2s ease;
}

.btn-logout-danger:hover {
    background: rgba(255, 82, 82, 0.15) !important;
}

.btn-admin-manage {
    color: #ffb74d !important;
}

.btn-admin-manage:hover {
    background: rgba(255, 152, 0, 0.15) !important;
}

/* 13. Modal za upravljanje korisnicima (Admin) */
.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-users-table th,
.admin-users-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.admin-users-table th {
    color: #9aa0a6;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-pill.active {
    background: rgba(0, 230, 118, 0.2);
    color: #00e676;
}

.status-pill.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.status-pill.deactivated {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Responsivnost */
@media (max-width: 480px) {
    #t2b-auth-overlay {
        padding: 12px 10px 24px 10px !important;
    }

    .t2b-auth-card {
        padding: 18px 16px 22px 16px !important;
        border-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: auto 0 !important;
    }

    .auth-card-topbar {
        margin-bottom: 4px !important;
    }

    .auth-brand-header {
        margin-bottom: 12px !important;
    }

    .auth-logo-badge {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 4px !important;
    }

    .auth-brand-logo-img {
        width: 28px !important;
        height: 28px !important;
    }

    .auth-brand-title {
        font-size: 19px !important;
        margin-bottom: 2px !important;
    }

    .auth-brand-subtitle {
        font-size: 11.5px !important;
    }

    .auth-tabs {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 12px !important;
    }

    .auth-tab-btn {
        padding: 7px 10px !important;
        font-size: 13.5px !important;
    }

    .auth-google-btn-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 12px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: visible !important;
    }

    #auth-google-render-target {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: visible !important;
    }

    #auth-google-render-target > div {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: visible !important;
    }

    #auth-google-render-target iframe {
        display: block !important;
        margin: -6px -10px !important;
        max-width: none !important;
    }

    .auth-divider {
        margin: 12px 0 !important;
    }

    .auth-field {
        margin-bottom: 10px !important;
    }

    .auth-label {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    .auth-input {
        height: 40px !important;
        font-size: 13.5px !important;
    }

    .auth-submit-btn {
        height: 42px !important;
        font-size: 14.5px !important;
        margin-top: 12px !important;
    }
}

@media (max-height: 720px) {
    #t2b-auth-overlay {
        padding: 10px 10px 20px 10px !important;
    }
    .t2b-auth-card {
        padding: 16px 20px 18px 20px !important;
        max-width: 420px !important;
        margin: auto 0 !important;
    }
    .auth-card-topbar {
        margin-bottom: 4px !important;
    }
    .auth-brand-header {
        margin-bottom: 8px !important;
    }
    .auth-logo-badge {
        width: 34px !important;
        height: 34px !important;
        margin-bottom: 2px !important;
    }
    .auth-brand-logo-img {
        width: 24px !important;
        height: 24px !important;
    }
    .auth-brand-title {
        font-size: 18px !important;
    }
    .auth-tabs {
        margin-bottom: 10px !important;
    }
    .auth-field {
        margin-bottom: 8px !important;
    }
    .auth-divider {
        margin: 8px 0 !important;
    }
}

/* ================================================================
   14. MODERAN PROZOR ZA UPRAVLJANJE PROFILOM (PROFILE MANAGEMENT)
   ================================================================ */
.modal-card-profile {
    max-width: 640px !important;
    width: 92% !important;
    border-radius: 18px !important;
    overflow: hidden !important;
}

/* Hero sekcija korisnika na vrhu modala */
.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.12) 0%, rgba(33, 150, 243, 0.04) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-hero-avatar-box {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-hero-avatar-box:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(3, 169, 244, 0.45);
}

.profile-hero-avatar-box::after {
    content: "📷";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.profile-hero-avatar-box:hover::after {
    opacity: 1;
}

.profile-hero-avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-hero-meta {
    flex: 1;
    min-width: 0;
}

.profile-hero-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-hero-email {
    font-size: 13px;
    color: #9aa0a6;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-hero-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}

.profile-tag-admin {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.profile-tag-user {
    background: rgba(3, 169, 244, 0.2);
    color: #4fc3f7;
    border: 1px solid rgba(3, 169, 244, 0.4);
}

.profile-tag-active {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.35);
}

.profile-tag-google {
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-tag-local {
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Navigacione kartice (Tabs) unutar profila */
.profile-tabs-nav {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    padding: 0 16px;
    gap: 8px;
}

.profile-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: #9aa0a6;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-tab-btn:hover {
    color: #ffffff;
}

.profile-tab-btn.active {
    color: #03a9f4;
    border-bottom-color: #03a9f4;
}

.profile-tab-content {
    display: none;
    padding: 20px 24px;
}

.profile-tab-content.active {
    display: block;
}

/* HORIZONTALNA PALETA BOJA ZA PROFIL (Vodoravno) */
.profile-colors-horizontal {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 8px !important;
    padding: 6px 2px;
}

.profile-color-bubble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.profile-color-bubble:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.profile-color-bubble.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px var(--primary, #03a9f4);
    transform: scale(1.14);
}

.profile-color-bubble.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Kartica bezbednosti */
.security-notice-box {
    background: rgba(3, 169, 244, 0.08);
    border: 1px solid rgba(3, 169, 244, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.security-notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.security-notice-text h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

.security-notice-text p {
    margin: 0;
    font-size: 12px;
    color: #9aa0a6;
    line-height: 1.5;
}

/* Detalji naloga Info Grid */
.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

.profile-info-label {
    font-size: 11px;
    color: #80868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-info-val {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    word-break: break-all;
}

/* ================================================================
   15. ZERO-KNOWLEDGE TREZOR & E2EE STILOVI
   ================================================================ */
.vault-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.vault-status-indicator.encrypted {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.35);
}

.vault-status-indicator.plain {
    background: rgba(255, 152, 0, 0.15);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.35);
}

.vault-security-banner {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08) 0%, rgba(3, 169, 244, 0.08) 100%);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-vault-action {
    background: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
    color: #0a0e17 !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-size: 12px !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-vault-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}

/* Base styles for vault & recovery key inside profile modal */
.vault-banner-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.profile-recovery-title {
    font-size: 13px;
    font-weight: 600;
    color: #00e5ff;
}

.profile-recovery-key-val {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 1.5px;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border-radius: 6px;
    user-select: all;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================================================
   16. SVETLA TEMA (LIGHT MODE) - KOMPLETAN VISOKI KONTRAST
   ================================================================ */

/* Login & Auth Overlay u Svetlom Modu */
body.theme-light #t2b-auth-overlay {
    background: radial-gradient(circle at 50% 30%, rgba(241, 245, 249, 0.94), rgba(226, 232, 240, 0.98)) !important;
}

body.theme-light .t2b-auth-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    color: #0f172a !important;
}

body.theme-light .auth-theme-toggle-btn {
    border-color: #cbd5e1 !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
}

body.theme-light .auth-theme-toggle-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

body.theme-light .auth-lang-picker {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

body.theme-light .auth-lang-picker:hover {
    background: #e2e8f0 !important;
    border-color: #0288d1 !important;
}

body.theme-light .auth-lang-icon {
    color: #64748b !important;
}

body.theme-light .auth-lang-select {
    color: #0f172a !important;
}

body.theme-light .auth-lang-select option {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.theme-light .auth-logo-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.theme-light .auth-brand-title {
    color: #0f172a !important;
}

body.theme-light .auth-brand-subtitle {
    color: #475569 !important;
}

body.theme-light .auth-tabs {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

body.theme-light .auth-tab-btn {
    color: #475569 !important;
}

body.theme-light .auth-tab-btn:hover {
    color: #0f172a !important;
}

body.theme-light .auth-tab-btn.active {
    background: #0288d1 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3) !important;
}

/* Google dugme za prijavu u Svetlom Modu - identično poljima za unos u svetloj temi */
body.theme-light #auth-google-render-target [role="button"],
body.theme-light #auth-google-render-target .nsm7Bb-HzV7m-LgbsSe {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

body.theme-light #auth-google-render-target [role="button"]:hover,
body.theme-light #auth-google-render-target .nsm7Bb-HzV7m-LgbsSe:hover {
    border-color: #0288d1 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.2) !important;
}

body.theme-light #auth-google-render-target .nsm7Bb-HzV7m-LgbsSe-BPrWId {
    color: #0f172a !important;
}

body.theme-light .auth-google-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body.theme-light .auth-google-btn:hover {
    border-color: #0288d1 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.2) !important;
}

body.theme-light .auth-google-btn span {
    color: #0f172a !important;
}

/* Svetla tema: Kontrole jezika i teme na auth kartici */
body.theme-light .nav-theme-btn {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
    color: #334155;
}

body.theme-light .nav-theme-btn:hover {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.35);
    color: #0284c7;
}

body.theme-light .pill-lang {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.theme-light .pill-lang:hover {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.35);
}

body.theme-light .lang-globe-icon,
body.theme-light .lang-code-text {
    color: #0284c7;
}

body.theme-light .pill-lang .pill-chevron {
    color: #64748b;
}

body.theme-light .lang-selector option {
    background: #ffffff;
    color: #0f172a;
}

body.theme-light .auth-label {
    color: #1e293b !important;
}

body.theme-light .auth-input {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light .auth-input::placeholder {
    color: #94a3b8 !important;
}

body.theme-light .auth-input:focus {
    background: #ffffff !important;
    border-color: #0288d1 !important;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.2) !important;
}

body.theme-light .auth-input:-webkit-autofill,
body.theme-light .auth-input:-webkit-autofill:hover, 
body.theme-light .auth-input:-webkit-autofill:focus, 
body.theme-light .auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
}

body.theme-light .auth-input-icon {
    stroke: #64748b !important;
}

body.theme-light .auth-input:focus ~ .auth-input-icon {
    stroke: #0288d1 !important;
}

body.theme-light .auth-divider::before,
body.theme-light .auth-divider::after {
    border-color: #e2e8f0 !important;
}

body.theme-light .auth-divider span {
    color: #64748b !important;
}

body.theme-light .auth-password-toggle {
    color: #64748b !important;
}

body.theme-light .auth-password-toggle:hover {
    color: #0f172a !important;
}

body.theme-light .auth-forgot-link {
    color: #0288d1 !important;
}

body.theme-light .auth-forgot-link:hover {
    color: #01579b !important;
}

/* Modal za profil korisnika (#modal-user-profile) u Svetlom Modu */
body.theme-light .modal-card-profile {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16) !important;
}

body.theme-light .profile-hero-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-bottom: 1px solid #cbd5e1;
}

body.theme-light .profile-hero-avatar-box {
    border-color: rgba(2, 136, 209, 0.25) !important;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.2) !important;
}

body.theme-light .profile-hero-name {
    color: #0f172a !important;
}

body.theme-light .profile-hero-email {
    color: #475569 !important;
}

body.theme-light .profile-tag-google,
body.theme-light .profile-tag-local {
    background: #e2e8f0 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

body.theme-light .profile-tabs-nav {
    background: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

body.theme-light .profile-tab-btn {
    color: #64748b !important;
}

body.theme-light .profile-tab-btn:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

body.theme-light .profile-tab-btn.active {
    color: #0288d1 !important;
    border-bottom-color: #0288d1 !important;
    background: #ffffff !important;
}

body.theme-light #modal-user-profile label {
    color: #1e293b !important;
    font-weight: 600 !important;
}

body.theme-light #modal-user-profile .form-control {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light #modal-user-profile .form-control:focus {
    border-color: #0288d1 !important;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.2) !important;
}

body.theme-light #modal-user-profile .form-control:disabled {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

body.theme-light #profile-email-note {
    color: #64748b !important;
}

body.theme-light .security-notice-box {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
}

body.theme-light .security-notice-text h4 {
    color: #0369a1 !important;
}

body.theme-light .security-notice-text p {
    color: #334155 !important;
}

body.theme-light .vault-security-banner {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
}

body.theme-light .vault-banner-title {
    color: #15803d !important;
}

body.theme-light .profile-recovery-key-card {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
}

body.theme-light .profile-recovery-title {
    color: #0288d1 !important;
}

body.theme-light .profile-recovery-key-val {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

body.theme-light #admin-legacy-import-box {
    background: #fffbeb !important;
    border-color: #fcd34d !important;
}

body.theme-light #admin-legacy-import-box h5 {
    color: #b45309 !important;
}

body.theme-light #btn-admin-choose-legacy-file {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

body.theme-light .profile-info-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.theme-light .profile-info-label {
    color: #64748b !important;
}

body.theme-light .profile-info-val {
    color: #0f172a !important;
}

body.theme-light #modal-user-profile .modal-footer {
    border-top: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

/* Ostali modal prozori u Svetlom Modu */
body.theme-light #modal-admin-users .modal-card,
body.theme-light #modal-unlock-vault .modal-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

body.theme-light #modal-admin-users .modal-header,
body.theme-light #modal-admin-users .modal-footer,
body.theme-light #modal-unlock-vault .modal-header,
body.theme-light #modal-unlock-vault .modal-footer {
    border-color: #e2e8f0 !important;
}

body.theme-light #admin-users-list-container {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
}

/* ==================== AVATAR CROPPER (FACEBOOK STIL) ==================== */
.avatar-cropper-viewport-wrap {
    width: 280px;
    height: 280px;
    position: relative;
    background: #090d16;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
}

.avatar-cropper-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: grab;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-cropper-viewport.grabbing {
    cursor: grabbing;
}

.avatar-cropper-viewport img {
    position: absolute;
    max-width: none;
    pointer-events: none;
    will-change: transform;
    user-select: none;
}

.avatar-cropper-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(10, 15, 26, 0.72);
    border-radius: 50%;
    border: 2.5px solid #03a9f4;
    width: 220px;
    height: 220px;
    margin: auto;
}

.avatar-cropper-zoom-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 280px;
    margin-top: 16px;
    color: var(--text-secondary);
}

.avatar-cropper-zoom-bar input[type="range"] {
    flex: 1;
    accent-color: #03a9f4;
    cursor: pointer;
}

/* ==================== BRANDED THEME ICONS SYSTEM ==================== */
body.theme-light .t2b-theme-icon.dark,
body.theme-light img.t2b-theme-icon.dark {
    display: none !important;
}
body.theme-light .t2b-theme-icon.light,
body.theme-light img.t2b-theme-icon.light {
    display: inline-block !important;
}
body.theme-dark .t2b-theme-icon.light,
body.theme-dark img.t2b-theme-icon.light {
    display: none !important;
}
body.theme-dark .t2b-theme-icon.dark,
body.theme-dark img.t2b-theme-icon.dark {
    display: inline-block !important;
}
body:not(.theme-light) .t2b-theme-icon.light,
body:not(.theme-light) img.t2b-theme-icon.light {
    display: none !important;
}
body:not(.theme-light) .t2b-theme-icon.dark,
body:not(.theme-light) img.t2b-theme-icon.dark {
    display: inline-block !important;
}

/* ==================== MODERN CONFIRM & ALERT DIALOG ==================== */
#modal-app-dialog .modal-container {
    background: var(--bg-surface, #1c2024);
    color: var(--text-primary, #ffffff);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 20px !important;
    animation: dialogPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 1px rgba(255, 255, 255, 0.15);
}

@keyframes dialogPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

body.theme-light #modal-app-dialog .modal-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ==================== CLEAN DIALOG ICONS - NO FRAMES, NO BORDERS, NO SHADOWS ==================== */
#app-dialog-icon-wrap {
    width: auto !important;
    height: 72px !important;
    margin: 0 auto 16px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

body.theme-light #app-dialog-icon-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.t2b-dialog-img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.t2b-dialog-icon {
    width: 68px;
    height: 68px;
    display: block;
    margin: 0 auto;
}

/* Colors for Dark Theme */
body.theme-dark .t2b-svg-primary,
body:not(.theme-light) .t2b-svg-primary {
    stroke: #38bdf8 !important;
}
body.theme-dark .t2b-svg-primary-fill,
body:not(.theme-light) .t2b-svg-primary-fill {
    fill: #38bdf8 !important;
}
body.theme-dark .t2b-svg-accent,
body:not(.theme-light) .t2b-svg-accent {
    stroke: #4ade80 !important;
}
body.theme-dark .t2b-svg-accent-fill,
body:not(.theme-light) .t2b-svg-accent-fill {
    fill: #4ade80 !important;
}

/* Colors for Light Theme */
body.theme-light .t2b-svg-primary {
    stroke: #2563eb !important;
}
body.theme-light .t2b-svg-primary-fill {
    fill: #2563eb !important;
}
body.theme-light .t2b-svg-accent {
    stroke: #16a34a !important;
}
body.theme-light .t2b-svg-accent-fill {
    fill: #16a34a !important;
}

.btn-logout-confirm {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
    transition: all 0.2s ease !important;
}
.btn-logout-confirm:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5) !important;
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
}
.btn-logout-confirm:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5) !important;
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
}

/* ==================== SAAS BILLING & FEATURE GATING ==================== */
.btn-topbar-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
    margin-right: 8px;
}
.btn-topbar-upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
    filter: brightness(1.08);
}
.t2b-topbar-crown {
    width: 16px;
    height: 12px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.btn-topbar-crown-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.topbar-plan-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-right: 8px;
}
.topbar-plan-badge.badge-starter {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}
.topbar-plan-badge.badge-pro {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.topbar-plan-badge.badge-agency {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.topbar-plan-badge.badge-admin {
    background: rgba(3, 169, 244, 0.15);
    color: #03a9f4;
    border: 1px solid rgba(3, 169, 244, 0.35);
}
.tab-pro-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
}
.branding-pro-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Modali za nadogradnju - usklađeni sa sistemom modal-card */
.upgrade-modal-card {
    max-width: 490px;
    width: 92%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card, #1e222d);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

body.theme-light .upgrade-modal-card {
    background: #ffffff !important;
    border: 1px solid #c6d2d9 !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12) !important;
}

.upgrade-modal-crown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.upgrade-modal-crown-badge img {
    width: 18px;
    height: 14px;
    object-fit: contain;
    display: block;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.upgrade-icon-badge {
    width: auto !important;
    height: 84px !important;
    margin: 0 auto 14px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.upgrade-icon-badge img {
    height: 84px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.theme-light .upgrade-icon-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.upgrade-modal-reason-text {
    margin: 0 0 16px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
}
body.theme-light .upgrade-modal-reason-text {
    color: #475569 !important;
}

.upgrade-plan-features-box {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    text-align: left;
}
body.theme-light .upgrade-plan-features-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.upgrade-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.upgrade-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 13px;
    color: var(--text-primary, #ffffff);
}
body.theme-light .upgrade-feature-item {
    color: #1e293b !important;
}
.upgrade-feature-item:last-child {
    margin-bottom: 0;
}
.upgrade-feature-item svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Elegantan preklopnik ciklusa sa popustom (skriven u ovoj verziji appa) */
.upgrade-billing-toggle-row {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}
.upgrade-toggle-label {
    cursor: pointer;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    transition: color 0.15s ease;
    user-select: none;
}
.upgrade-toggle-label.active {
    color: var(--text-primary, #ffffff);
    font-weight: 700;
}
body.theme-light .upgrade-toggle-label.active {
    color: #0f172a !important;
}

.upgrade-toggle-switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
}
body.theme-light .upgrade-toggle-switch {
    background: #cbd5e1;
    border-color: #94a3b8;
}
.upgrade-toggle-switch.annual {
    background: #0288d1;
    border-color: #0288d1;
}
.upgrade-toggle-switch .knob {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.upgrade-toggle-switch.annual .knob {
    transform: translateX(20px);
}
.upgrade-discount-pill {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
}

.btn-gold-upgrade {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}
.btn-gold-upgrade:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5) !important;
    filter: brightness(1.08) !important;
}

.pro-lock-card {
    background: rgba(245, 158, 11, 0.05);
    border: 1px dashed rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 36px 24px;
    text-align: center;
    max-width: 540px;
    margin: 40px auto;
}
body.theme-light .pro-lock-card {
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed rgba(245, 158, 11, 0.45);
}

/* Editable Notes & Terms on Invoice & Quote sheets */
.clk-inv-notes-textarea {
    width: 100%;
    min-height: 54px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.45;
    border-radius: 4px;
    padding: 6px 8px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s, background-color 0.2s;
}
body.theme-light .clk-inv-notes-textarea {
    border: 1px dashed rgba(148, 163, 184, 0.6);
    background: rgba(0, 0, 0, 0.02);
}
.clk-inv-notes-textarea:focus {
    outline: none;
    border-color: var(--primary, #03a9f4);
    background: rgba(3, 169, 244, 0.05);
}

.clk-inv-custom-logo {
    max-height: 44px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Custom Line Items on Invoices & Quotes */
.clk-custom-item-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(3, 169, 244, 0.12);
    color: #0288d1;
    border: 1px solid rgba(3, 169, 244, 0.25);
    white-space: nowrap;
    user-select: none;
}
body.theme-light .clk-custom-item-badge {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.clk-custom-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border-radius: 5px;
    padding: 5px 9px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
body.theme-light .clk-custom-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.clk-custom-input:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.15);
    background: #ffffff;
}

.clk-custom-num-input {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    padding: 5px 8px;
    text-align: right;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
body.theme-light .clk-custom-num-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.clk-custom-num-input:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.15);
    background: #ffffff;
}

.clk-custom-delete-btn {
    color: #ef4444;
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.75;
    transition: opacity 0.15s, transform 0.15s;
}
.clk-custom-delete-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

@media print {
    .clk-inv-notes-textarea {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        resize: none !important;
        color: #000 !important;
    }
    .clk-custom-item-badge {
        display: none !important;
    }
    .clk-custom-input,
    .clk-custom-num-input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: #000 !important;
        font-size: inherit !important;
        font-family: inherit !important;
        outline: none !important;
    }
    .clk-custom-delete-btn,
    .inv-btn-delete-custom-item,
    .quote-btn-delete-custom-item {
        display: none !important;
    }
    .quote-pricing-mode-toggle {
        display: none !important;
    }
}

/* Quote Pricing Mode Selector */
.btn-quote-pricing-mode {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-quote-pricing-mode:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
body.theme-light .btn-quote-pricing-mode:hover {
    background: rgba(0, 0, 0, 0.04);
}
.btn-quote-pricing-mode.active {
    background: var(--primary, #03a9f4) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(3, 169, 244, 0.35);
}





/* Settings Logo Preview Box */
.settings-logo-preview-box {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.settings-logo-preview-box:hover {
    border-color: var(--primary, #03a9f4) !important;
    background: rgba(3, 169, 244, 0.08) !important;
    transform: scale(1.02);
}
.settings-logo-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Dimmed Input for Fixed Custom Items */
.clk-dimmed-input {
    opacity: 0.35 !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.clk-dimmed-input:hover {
    opacity: 0.75 !important;
    background: rgba(3, 169, 244, 0.1) !important;
    border-color: var(--primary, #03a9f4) !important;
}
body.theme-light .clk-dimmed-input {
    opacity: 0.35 !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    cursor: pointer !important;
}
body.theme-light .clk-dimmed-input:hover {
    opacity: 0.8 !important;
    background: #e0f2fe !important;
    border-color: #03a9f4 !important;
}

@media print {
    .clk-dimmed-input {
        visibility: hidden !important;
    }
}

/* ==================== 14. USERS VIEW & ADMIN STYLING ==================== */
.user-role-badge {
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.user-role-badge:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}
body.theme-light .user-role-badge.admin {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}
body.theme-light .user-role-badge.user {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
body.theme-light .status-pill.active {
    background: #dcfce7;
    color: #15803d;
}
body.theme-light .status-pill.pending {
    background: #fef3c7;
    color: #b45309;
}
body.theme-light .status-pill.deactivated {
    background: #fee2e2;
    color: #b91c1c;
}
.user-row.row-pending {
    transition: background 0.2s ease;
}
body.theme-light .user-row.row-pending {
    background: #fffbeb !important;
}
body.theme-light .user-row.row-pending:hover {
    background: #fef3c7 !important;
}

