:root {
    --primary-color: #f0f7ff;
    --primary-hover: #e0effe;
    --primary-text: #0f2744;
    --primary-border: #bae0fd;
    --bg-color: #f9fafb;
    --navbar-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --navbar-width: 260px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-bg: #f3f4f6;
    --input-bg: #f3f4f6;
}

[data-theme="dark"] {
    --primary-color: #f0f7ff;
    --primary-hover: #e0effe;
    --primary-text: #0f2744;
    --primary-border: #bae0fd;
    --bg-color: #111827;
    --navbar-bg: #1f2937;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --card-bg: #1f2937;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --hover-bg: #374151;
    --input-bg: #374151;
}

[data-theme="dark"] .totp-field {
    color: #ffffff !important;
}

/* ------------------------------------------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ------------------------------------------- */

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

/* ------------------------------------------- */

/* Layout */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

.main-app-container {
    display: flex;
    flex: 1;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
}

/* ------------------------------------------- */

/* navbar */
.navbar {
    width: 100%;
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 24px;
    height: 70px;
    position: relative;
    z-index: 100;
}

.navbar-header {
    padding: 0;
    border-bottom: none;
    grid-column: 2;
    display: flex;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: #0284c7;
}

[data-theme="dark"] .logo-text {
    color: #38bdf8;
}

.navbar-left {
    grid-column: 1;
    display: flex;
    align-items: center;
}

.auth-nav {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.auth-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-nav a:hover {
    background-color: var(--hover-bg);
}

.auth-nav a.active {
    background-color: var(--primary-color);
    color: var(--primary-text) !important;
    border: 1px solid var(--primary-border);
    font-weight: 600;
}

/* Auth Dropdown Menu (Mobile/Responsive) */
.auth-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    z-index: 110;
}

.auth-dropdown-menu.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: authDropdownSlide 0.2s ease-out forwards;
}

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

.auth-dropdown-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.auth-dropdown-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-dropdown-list a:hover {
    background-color: var(--hover-bg);
    border-color: var(--primary-color);
}

.auth-dropdown-list a.active {
    background-color: var(--primary-color);
    border-color: var(--primary-border);
    color: var(--primary-text) !important;
    font-weight: 600;
}

.auth-dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 2px 0;
}

.auth-dropdown-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.navbar-nav {
    grid-column: 1;
    padding: 0;
    display: flex;
    align-items: center;
    overflow: visible;
}

.navbar-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.navbar-nav li {
    margin-bottom: 0;
}

.navbar-nav .nav-label {
    display: none; /* Hide labels in horizontal nav to save space */
}

.navbar-nav a {
    display: block;
    padding: 10px 12px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.navbar-nav a:hover {
    background-color: var(--hover-bg);
}

.navbar-nav a.active {
    background-color: var(--primary-color);
    color: var(--primary-text);
    border: 1px solid var(--primary-border);
    font-weight: 600;
}

.navbar-footer {
    grid-column: 3;
    padding: 0;
    border-top: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.navbar-footer-mobile {
    display: none;
}

.footer-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.nav-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    background-color: transparent;
    border: 1px solid var(--border-color);
}

.nav-profile-link:hover {
    background-color: var(--hover-bg);
}

.nav-profile-link.active {
    background-color: var(--primary-color);
    color: var(--primary-text);
    border-color: var(--primary-border);
    font-weight: 600;
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background-color: var(--hover-bg);
}


/* ------------------------------------------- */

/* Avtentikator */
.authenticator {
    display: block;
    margin: 0 auto;
    width: 25%;
}

.authenticator-container {
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.secret-display {
    font-size: 1.2em;
    letter-spacing: 2px;
    word-break: break-all;
    color: #e94560;
    font-weight: bold;
}

.code-display {
    font-size: 2.5em;
    letter-spacing: 8px;
    color: #333333;
    text-align: center;
    font-weight: bold;
}

.timer-bar {
    height: 4px;
    background: #0f3460;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    background: #00ff88;
    transition: width 1s linear;
}

#codeInput {
    font-family: monospace;
    font-size: 1.2em;
    letter-spacing: 4px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    background: #1a1a2e;
    color: #e0e0e0;
    border: 1px solid #0f3460;
    border-radius: 4px;
    text-align: center;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    color: #a0a0a0;
}

.result {
    text-align: center;
    font-size: 1.3em;
    margin-top: 8px;
    min-height: 24px;
    font-family: monospace;
}

.result.success {
    color: #333333;
}

.result.error {
    color: #ff4444;
}

.otpauth-uri {
    font-size: 0.8em;
    word-break: break-all;
    color: #555;
    margin-top: 8px;
}

.authenticator-button {
    background: #e94560;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    font-family: monospace;
    margin-top: 8px;
}

.authenticator-button:hover {
    background: #c81d4a;
}

/* ------------------------------------------- */

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.content-wrapper {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 24px;
}

/* Sidebar Styles */
.app-sidebar {
    width: 260px;
    background-color: var(--navbar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-content {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.btn-logout-sidebar {
    color: var(--danger) !important;
    font-weight: 600 !important;
}

.btn-logout-sidebar:hover {
    background-color: #fee2e2 !important;
}

[data-theme="dark"] .btn-logout-sidebar:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-title {
    padding: 0 20px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background-color: var(--hover-bg);
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: var(--primary-text);
    font-weight: 600;
    border-left: 4px solid #38bdf8;
}

.sidebar-nav .icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Password List Panel (Middle) */
.password-list-panel {
    flex: 1;
    width: 50%;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background-color: var(--bg-color);
}

.password-list-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.password-item:hover {
    background-color: var(--hover-bg);
}

.password-item.active {
    background-color: rgba(240, 247, 255, 0.9);
    border-left: 4px solid #38bdf8;
    padding-left: 16px;
}

[data-theme="dark"] .password-item.active {
    background-color: rgba(240, 247, 255, 0.15);
}

.password-item .item-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-item .item-info {
    flex: 1;
}

.password-item .item-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.password-item .item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Password Details Panel (Right) */
.password-details-panel {
    flex: 1;
    width: 50%;
    overflow-y: auto;
    background-color: var(--card-bg);
}

.details-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 40px;
    text-align: center;
}

.details-placeholder .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        overflow-y: auto;
    }

    .app-sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        transform: translateX(-100%);
        width: 260px;
        max-width: 85vw;
        height: calc(100vh - 60px);
        background-color: var(--navbar-bg);
        z-index: 100;
        transition: transform 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
        box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.1);
        border-right: 1px solid var(--border-color);
        border-bottom: none;
    }

    .app-sidebar.active {
        transform: translateX(0);
        visibility: visible;
    }

    .password-list-panel, .password-details-panel {
        width: 100%;
        flex: none;
        border-right: none;
        height: auto;
    }

    .password-details-panel {
        order: -1;
        border-bottom: 2px solid var(--border-color);
    }

    .password-details-panel:not(.has-selected) {
        display: none;
    }
}

.top-bar {
    background-color: var(--navbar-bg);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.content-wrapper {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ------------------------------------------- */

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: var(--card-bg);
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-card .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.category-card h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.category-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ------------------------------------------- */

/* Password Cards */
.password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.password-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Password Table Styling */
.password-table-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.password-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 900px;
}

.password-table th,
.password-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.password-table th {
    background-color: var(--input-bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.password-table tr:last-child td {
    border-bottom: none;
}

.password-table tr:hover {
    background-color: var(--hover-bg);
}

.website-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: block;
    background-color: var(--input-bg);
}

.website-icon-mini {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: contain;
    margin-right: 8px;
}

.td-icon {
    width: 60px;
    text-align: center;
}

.td-name {
    min-width: 150px;
}

.td-user {
    min-width: 180px;
}

.td-pass {
    min-width: 220px;
}

.td-wifi-5g, .td-wifi-24g {
    min-width: 220px;
}

.td-router {
    min-width: 140px;
}

.td-email {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.td-url {
    width: 60px;
    text-align: center;
}

.td-card-num {
    min-width: 180px;
}

.td-card-pin {
    width: 80px;
    text-align: center;
}

.td-card-cvv {
    width: 80px;
    text-align: center;
}

.td-actions {
    width: 100px;
    text-align: right;
    white-space: nowrap;
}

.td-actions-inner {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.table-input-group {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 6px;
    padding: 2px 4px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.table-input-group:focus-within {
    border-color: #38bdf8;
    background: var(--card-bg);
}

.copyable-table {
    border: none;
    background: transparent;
    padding: 4px 6px;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
}

.btn-copy-mini, .btn-toggle-mini, .btn-delete-mini, .btn-edit-mini {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-copy-mini:hover, .btn-toggle-mini:hover {
    color: #0284c7;
    background-color: rgba(56, 189, 248, 0.15);
}

.btn-edit-mini:hover {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.btn-delete-mini:hover {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}

.btn-copy-mini span, .btn-toggle-mini span, .btn-delete-mini span, .btn-edit-mini span {
    font-size: 18px;
}

.table-url-link {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.table-url-link:hover {
    color: #0284c7;
    background-color: rgba(56, 189, 248, 0.15);
}

.card-header {
    padding: 16px 20px;
    background-color: var(--input-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2,
.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.card-body {
    padding: 20px;
}

.field {
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.field input {
    padding: 8px 12px;
    width: 50%;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-main);
    font-family: monospace;
    font-size: 0.95rem;
}

.btn-copy, .btn-toggle {
    padding: 6px 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-bg);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-copy:hover, .btn-toggle:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-muted);
}

.btn-success {
    background-color: var(--success) !important;
    color: white !important;
    border-color: var(--success) !important;
}

.url-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}

[data-theme="dark"] .url-link {
    color: #38bdf8;
}

.url-link:hover {
    text-decoration: underline;
}

.btn-delete {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit {
    color: #f59e0b;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-delete span, .btn-edit span, .btn-close-card span {
    font-size: 18px;
}

.btn-close-card {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-close-card:hover {
    color: var(--text-main);
    background-color: var(--hover-bg);
}

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

/* ------------------------------------------- */

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-container {
    background-color: var(--card-bg);
    margin: 10vh auto;
    width: 95%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-top {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.close-icon {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-content h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.enter-pass form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.enter-pass label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.enter-pass input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--primary-text);
    border: 1px solid var(--primary-border);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: #93c5fd;
    color: var(--primary-text);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ------------------------------------------- */

/* Responsive */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    margin-right: 0;
    grid-column: 1;
    justify-self: start;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: var(--hover-bg);
}

.mobile-menu-toggle.active {
    background-color: var(--hover-bg);
    color: var(--primary-color);
}

.navbar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 45;
    backdrop-filter: blur(2px);
}

.navbar-overlay.active {
    display: block;
}

/* ------------------------------------------- */

/* Admin Panel */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--input-bg);
    color: var(--text-main);
    font-weight: 600;
}

.badge {
    background: rgba(2, 136, 209, 0.1);
    color: #0288d1;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(119, 119, 119, 0.1);
    color: var(--text-muted);
}

.status-badge.admin {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.status-badge.active {
    background: rgba(25, 118, 210, 0.1);
    color: #1976d2;
}

.status-badge.pending {
    background: rgba(245, 124, 0, 0.1);
    color: #f57c00;
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
}

/* ------------------------------------------- */

@media (max-width: 1279px) {
    .password-table-container {
        background-color: transparent;
        border: none;
        box-shadow: none;
        overflow-x: visible;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .password-table,
    .password-table thead,
    .password-table tbody,
    .password-table th,
    .password-table td,
    .password-table tr {
        display: block;
        min-width: auto;
    }

    .password-table thead {
        display: none;
    }

    .password-table tbody {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .password-table tr {
        background-color: var(--card-bg);
        border-radius: 12px;
        margin-bottom: 0;
        padding: 15px;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-color);
    }

    @media (min-width: 480px) {
        .password-table tbody {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (min-width: 1040px) {
        .password-table tbody {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    .password-table td {
        border-bottom: 1px solid var(--border-color);
        padding: 12px 5px;
        text-align: right;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-width: 0 !important;
        width: 100% !important;
        gap: 10px;
    }

    .password-table td:last-child {
        border-bottom: none;
    }

    .password-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.7rem;
        text-transform: uppercase;
        text-align: left;
        padding-right: 10px;
    }

    /* Ikona na vrhu in na sredini */
    .password-table td.td-icon {
        justify-content: center;
        border-bottom: 1px solid #f1f5f9;
        padding: 10px 0 20px 0;
        margin-bottom: 10px;
    }

    .password-table td.td-icon::before {
        display: none;
    }

    .password-table .website-icon {
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }

    .password-table td.td-name {
        font-size: 1.1rem;
        border-bottom: 2px solid #f1f5f9;
        margin-bottom: 5px;
    }

    .password-table .table-input-group {
        flex: 1;
        max-width: 75%;
    }

    /* Akcije na dnu */
    .password-table td.td-actions {
        justify-content: center;
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid #f1f5f9;
    }

    .password-table td.td-actions::before {
        display: none;
    }

    .password-table .td-actions-inner {
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }

    .password-table .btn-edit-mini span,
    .password-table .btn-delete-mini span {
        font-size: 28px;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }

    .admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #f3f4f6;
    }

    .admin-table td:last-child {
        border-bottom: none;
    }

    .admin-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: var(--text-muted);
        font-size: 0.8rem;
        text-transform: uppercase;
    }
}

.mobile-dropdown-brand,
.sidebar-brand-mobile {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--navbar-bg);
    margin-bottom: 12px;
    gap: 10px;
}

.mobile-dropdown-brand .logo,
.sidebar-brand-mobile .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.mobile-dropdown-brand .navbar-logo-link,
.sidebar-brand-mobile .navbar-logo-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    align-self: flex-start;
}

.sidebar-brand-mobile {
    margin: 0;
    padding: 14px 16px;
}

@media (min-width: 1025px) {
    .auth-menu-toggle,
    .mobile-menu-toggle,
    .auth-dropdown-menu,
    .mobile-dropdown-brand,
    .sidebar-brand-mobile {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .mobile-dropdown-brand,
    .sidebar-brand-mobile {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: 1;
    }

    .auth-nav {
        display: none !important;
    }

    .navbar {
        height: 60px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .navbar-left {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .navbar-left .navbar-logo-link {
        display: none !important;
    }

    .navbar-header {
        display: none !important;
    }

    .navbar-footer {
        display: none !important;
    }

    .navbar-nav {
        position: fixed;
        top: 60px;
        left: 0;
        transform: translateX(-100%);
        width: 260px;
        max-width: 85vw;
        height: calc(100vh - 60px);
        background-color: var(--navbar-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        transition: transform 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
        box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 100;
        grid-column: auto;
    }

    .navbar-nav.active {
        transform: translateX(0);
        visibility: visible;
    }

    .navbar-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .navbar-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
    }

    /* Show labels on mobile sidebar */
    .navbar-nav a::after {
        content: attr(title);
        display: inline-block;
    }

    .navbar-footer {
        display: none; /* Hide in top bar on mobile, or move to sidebar */
    }

    .navbar-nav .navbar-footer-mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: auto;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .password-grid {
        grid-template-columns: 1fr;
    }

    .field input {
        width: 100% !important;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group button {
        width: 100%;
    }

    .modal-container {
        margin: 5vh auto;
        width: 95%;
    }

    .auth-card {
        padding: 24px;
    }

    .auth-container {
        padding: 0;
        gap: 20px;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0 auto;
    }

    .auth-page .auth-stack {
        margin-top: 0;
    }

    .auth-card .btn-primary {
        width: 100%;
    }

    .auth-header h1 {
        font-size: 1.25rem;
    }

    .auth-page-header h1 {
        font-size: 1.35rem;
    }

    .auth-page-header p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 10px;
    }

    .auth-card {
        padding: 20px 15px;
    }

    .card-header h2,
    .card-header h3 {
        font-size: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 15px;
    }

    .top-bar-actions .btn-primary {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .category-card {
        padding: 20px 15px;
    }

    .category-card .icon {
        font-size: 2.5rem;
    }
}

/* ------------------------------------------- */

/* Auth Pages */
.auth-page-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 20px auto;
    padding: 0 15px;
}

.auth-page-header h1 {
    color: var(--text-main);
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-page-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    width: 100%;
    padding: 20px;
}

.auth-page.auth-container {
    min-height: auto;
    padding: 0 20px 40px 20px;
}

/* Footer */
.app-footer {
    background-color: var(--navbar-bg);
    border-top: 1px solid var(--border-color);
    padding: 12px 40px;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    text-align: center;
}

.footer-content p {
    margin: 0;
}

.footer-github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.footer-github-link:hover {
    color: var(--text-main);
    opacity: 0.9;
    transform: translateY(-1px);
}

.footer-github-link svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-logo-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.footer-logo {
    height: 24px;
    width: auto;
    display: block;
}

.footer-logo.logo-light {
    display: block;
}

.footer-logo.logo-dark {
    display: none;
}

[data-theme="dark"] .footer-logo.logo-light {
    display: none;
}

[data-theme="dark"] .footer-logo.logo-dark {
    display: block;
}

/* Navbar Logo */
.navbar-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-right: 14px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-logo-link.navbar-logo-right {
    margin-right: 0;
    margin-left: 14px;
}

.navbar-logo-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.nav-logo {
    height: 38px;
    max-height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-logo {
        height: 30px;
        max-height: 32px;
    }
}

.nav-logo.logo-light {
    display: block;
}

.nav-logo.logo-dark {
    display: none;
}

[data-theme="dark"] .nav-logo.logo-light {
    display: none;
}

[data-theme="dark"] .nav-logo.logo-dark {
    display: block;
}

/* Guest Top Bar */
.guest-top-bar {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #ffffff;
    padding: 8px 20px;
    font-size: 0.88rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.guest-top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.guest-top-bar-btn {
    background: #ffffff;
    color: #b45309;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.guest-top-bar-btn:hover {
    background: #fef3c7;
    transform: translateY(-1px);
}

/* Guest Login Divider & Button */
.guest-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.guest-login-divider::before,
.guest-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.guest-login-divider span {
    padding: 0 10px;
    text-transform: uppercase;
    font-weight: 500;
}

.btn-guest {
    width: 100%;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-guest:hover {
    background: var(--hover-bg);
    border-color: var(--primary-border);
    color: black;
}

[data-theme="dark"] .btn-guest:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Subscription Card */
.subscription-card {
    background: linear-gradient(135deg, rgba(240, 247, 255, 0.9), rgba(224, 239, 254, 0.6));
    border: 1px solid rgba(186, 224, 253, 0.9);
    border-radius: 12px;
    padding: 18px 22px;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(186, 224, 253, 0.4);
}

[data-theme="dark"] .subscription-card {
    background: linear-gradient(135deg, rgba(240, 247, 255, 0.12), rgba(224, 239, 254, 0.06));
    border-color: rgba(186, 224, 253, 0.3);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.subscription-badge {
    font-weight: 700;
    font-size: 1rem;
    color: #0284c7;
}

[data-theme="dark"] .subscription-badge {
    color: #38bdf8;
}

.subscription-price {
    background: var(--primary-color);
    color: var(--primary-text);
    border: 1px solid var(--primary-border);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.subscription-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-main);
    opacity: 0.9;
}

.subscription-paypal-action {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(186, 224, 253, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

[data-theme="dark"] .subscription-paypal-action {
    border-top-color: rgba(186, 224, 253, 0.25);
}

.subscription-paypal-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.paypal-subscribe-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.paypal-subscribe-btn {
    vertical-align: middle;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.paypal-subscribe-btn:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

.alert-paypal-box {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid rgba(16, 185, 129, 0.35);
    text-align: center;
}

.alert-paypal-title {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.guest-transfer-notice {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    color: #059669;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}

[data-theme="dark"] .guest-transfer-notice {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.guest-transfer-icon {
    font-size: 18px;
    line-height: 1.45;
    flex-shrink: 0;
    margin-top: 1px;
}

.guest-transfer-text {
    flex: 1;
}

.guest-transfer-count {
    white-space: nowrap;
    display: inline;
}

/* Guest Sidebar Section */
.guest-sidebar-section {
    padding: 0 10px;
    margin-top: 10px;
}

.guest-sidebar-card {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

[data-theme="dark"] .guest-sidebar-card {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

.guest-sidebar-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: #d97706;
}

[data-theme="dark"] .guest-sidebar-title {
    color: #fbbf24;
}

.guest-sidebar-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 2px 0 6px;
}

.btn-guest-sidebar-register {
    display: block;
    font-size: 0.8rem !important;
    padding: 5px 8px !important;
    text-decoration: none;
    border-radius: 6px;
}

.modal-image-container {
    max-width: 95vw;
    width: fit-content;
    margin: 5vh auto;
}

.modal-image-container .modal-content {
    padding: 10px;
    text-align: center;
}

.full-preview-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.modal-caption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ------------------------------------------- */

@media (max-width: 768px) {
    .modal-image-container {
        width: 100% !important;
        max-width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .modal-image-container .modal-top {
        background: var(--card-bg);
    }

    .modal-image-container .modal-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px;
        background: var(--card-bg);
    }

    .full-preview-img {
        max-height: 70vh;
        width: 100%;
        object-fit: contain;
    }
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 500px;
    overflow-wrap: break-word;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--text-main);
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.auth-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
}

.auth-page .auth-stack {
    margin-top: 0;
}

/* Test notice card */
.test-notice-card {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-left: 4px solid var(--danger);
    border-radius: 12px;
    padding: 16px 20px;
    width: 100%;
    max-width: 500px;
    height: auto;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.06);
}

[data-theme="dark"] .test-notice-card {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
    border-left-color: #f87171;
}

.test-notice-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
}

[data-theme="dark"] .test-notice-title {
    color: #f87171;
}

.test-notice-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--danger);
}

[data-theme="dark"] .test-notice-card p {
    color: #fca5a5;
}

.lang-selector {
    padding: 0;
}

.lang-link {
    display: inline;
    padding: 5px;
    text-decoration: none;
    color: var(--text-main);
}

.lang-link.active {
    font-weight: bold;
    color: #0284c7;
}

[data-theme="dark"] .lang-link.active {
    color: #38bdf8;
}

/* Recovery Code Styles */
.recovery-code-container {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.recovery-code-header {
    font-weight: bold;
    color: #0284c7;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

[data-theme="dark"] .recovery-code-header {
    color: #38bdf8;
}

.recovery-code-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 15px;
    background: var(--card-bg);
    border: 2px dashed #38bdf8;
    border-radius: 6px;
    margin-bottom: 15px;
    word-break: break-all;
    color: var(--text-main);
}

.recovery-code-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.recovery-code-warning {
    font-size: 0.85rem;
    color: var(--danger);
    font-weight: bold;
}

/* Password Generator */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-container input {
    width: 100% !important;
    padding-right: 40px !important;
}

.password-gen-icon {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-gen-icon:hover {
    color: #0284c7;
}

[data-theme="dark"] .password-gen-icon:hover {
    color: #38bdf8;
}

.password-generator-ui {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow-md);
    z-index: 110;
    margin-top: 8px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.password-generator-ui.active {
    display: flex;
}

.gen-setting {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gen-setting label {
    font-size: 0.85rem;
    color: var(--text-main);
    margin: 0 !important;
    display: block !important;
}

.gen-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gen-slider {
    flex: 1;
    height: 6px;
    background: var(--input-bg);
    border-radius: 3px;
    outline: none;
}

.gen-length-val {
    font-weight: bold;
    min-width: 24px;
    color: #0284c7;
    font-size: 0.9rem;
}

[data-theme="dark"] .gen-length-val {
    color: #38bdf8;
}

.gen-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gen-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-main);
}

.gen-option input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    cursor: pointer;
}

.btn-gen-apply {
    width: 100%;
    padding: 8px !important;
    font-size: 0.85rem !important;
    margin-top: 4px;
}

/* TOTP Styles */
.totp-timer {
    width: 100%;
    height: 3px;
    background-color: var(--input-bg);
    margin-top: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.totp-progress {
    height: 100%;
    background-color: #0284c7;
    width: 100%;
    transition: width 1s linear;
}

[data-theme="dark"] .totp-progress {
    background-color: #38bdf8;
}

.totp-field {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    letter-spacing: 2px;
    color: #0284c7 !important;
}

[data-theme="dark"] .totp-field {
    color: #38bdf8 !important;
}

/* ============================================================
   PROFIL UPORABNIKA (profile.php)
   ============================================================ */
.profile-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 30px;
    box-sizing: border-box;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 24px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

.profile-card-2fa {
    grid-column: 1 / -1;
}

.profile-card-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.profile-card-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-word;
}

.profile-card-body {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.profile-card form {
    width: 100%;
    box-sizing: border-box;
}

.profile-card .field {
    width: 100%;
    box-sizing: border-box;
}

.profile-card .field input {
    width: 100%;
    box-sizing: border-box;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    color: var(--text-muted);
    flex-shrink: 0;
}

.profile-info-value {
    color: var(--text-main);
    text-align: right;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.status-badge.admin {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-badge.user {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.recovery-highlight-card {
    animation: fadeIn 0.3s ease;
}

.recovery-code-value {
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    box-sizing: border-box;
}

.two-fa-setup-box {
    max-width: 100%;
    box-sizing: border-box;
}

.secret-display {
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .content-wrapper {
        padding: 20px 15px;
    }
}

@media (max-width: 768px) {
    .profile-container {
        padding-bottom: 20px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }

    .profile-card-2fa {
        grid-column: auto;
    }

    .profile-card {
        padding: 18px 14px;
        border-radius: 10px;
    }

    .profile-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
    }

    .profile-info-value {
        text-align: left;
        width: 100%;
    }

    .recovery-code-value {
        font-size: 1.15rem !important;
        letter-spacing: 1.5px !important;
        padding: 10px !important;
    }

    .two-fa-setup-box {
        padding: 14px 10px !important;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 10px;
    }

    .profile-card {
        padding: 15px 12px;
    }

    .profile-card-header h3 {
        font-size: 1.05rem;
    }

    .recovery-code-value {
        font-size: 1rem !important;
        letter-spacing: 1px !important;
        padding: 8px !important;
    }
}

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

/* ============================================================
   STRAN ZA IZVOZ (export.php)
   ============================================================ */
.export-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.export-card {
    width: 100%;
    max-width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin: 10px 0 20px 0;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.export-btn {
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    box-sizing: border-box;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--primary-border);
    color: var(--text-main);
}

.warning-box {
    width: 100%;
    max-width: 100%;
    background-color: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--danger);
    padding: 20px;
    margin: 15px 0 20px 0;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 1px solid rgba(239, 68, 68, 0.15);
    border-right: 1px solid rgba(239, 68, 68, 0.15);
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
    box-sizing: border-box;
}

[data-theme="dark"] .warning-box {
    background-color: rgba(239, 68, 68, 0.12);
}

.warning-box-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.warning-box .warning-icon {
    color: var(--danger);
    font-size: 2.2rem;
    flex-shrink: 0;
    line-height: 1;
}

.warning-box h4 {
    color: var(--danger);
    margin: 0 0 6px 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.warning-box p {
    color: var(--danger);
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.export-instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 20px 0;
    box-sizing: border-box;
}

.instructions-box {
    width: 100%;
    max-width: 100%;
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.instructions-box h4 {
    margin: 0 0 16px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 1.15rem;
}

.instructions-box h4 .material-icons-outlined {
    color: var(--primary-color);
    font-size: 1.4rem;
}

[data-theme="dark"] .instructions-box h4 .material-icons-outlined {
    color: var(--primary-border);
}

.instructions-box ol {
    margin: 0;
    padding-left: 24px;
    line-height: 1.6;
    color: var(--text-main);
}

.instructions-box li {
    margin-bottom: 10px;
}

.instructions-box li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .export-instructions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .export-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .export-btn {
        width: 100%;
    }

    .warning-box {
        padding: 16px;
    }

    .instructions-box {
        padding: 18px;
    }
}
