:root {
    --bg-color: #f5f6fa;
    --surface-color: rgba(255, 255, 255, 0.85);
    --surface-solid: #ffffff;
    --text-main: #1e1e24;
    --text-muted: #75758a;
    --accent-color: #111111; /* Sleek monochrome black */
    --accent-text: #ffffff;
    --border-color: #e2e2ec;
    --danger-color: #e53935;
    --kroki-bg: #ececf3;
    --input-bg: #f5f6fa;
    --accent-glow: rgba(0, 0, 0, 0.08);
    
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.1);
    
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Loader Theming Variables */
    --loader-bg: #ffffff;
    --loader-track: rgba(0, 0, 0, 0.08);
    --loader-spin: #000000; /* Pure Black for Light Loader */
    --loader-fill: rgba(0, 0, 0, 0.03);
    --loader-text: #000000;
}

[data-theme="dark"] {
    --bg-color: #08080f; /* Velvet space theme */
    --surface-color: rgba(18, 18, 30, 0.8);
    --surface-solid: #12121e;
    --text-main: #f0f0f5;
    --text-muted: #8c8c9e;
    --accent-color: #ffffff; /* Glowing white neon */
    --accent-text: #000000;
    --border-color: #1d1d2f;
    --danger-color: #ff5252;
    --kroki-bg: #0d0d16;
    --input-bg: #0d0d16;
    --accent-glow: rgba(255, 255, 255, 0.25);
    
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.45);

    /* Loader Theming Variables */
    --loader-bg: #000000; /* Pure Black Background for Dark Loader */
    --loader-track: rgba(255, 255, 255, 0.15);
    --loader-spin: #ffffff; /* Pure White Spinner for Dark Loader */
    --loader-fill: rgba(255, 255, 255, 0.04);
    --loader-text: #ffffff;
}

[data-theme="dark"] .login-overlay {
    background: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .instructions {
    background: rgba(124, 106, 239, 0.15);
    color: #a094f0;
}

[data-theme="dark"] .upload-btn:hover {
    background: #22223a;
}

[data-theme="dark"] .zone-polygon:hover {
    fill: rgba(124, 106, 239, 0.5);
}

[data-theme="dark"] .print-template {
    background: white !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .print-template * {
    color: #1a1a1a !important;
}

[data-theme="dark"] .print-preview-wrapper {
    background: #1a1a2e !important;
}

[data-theme="dark"] .print-preview-area {
    background: white !important;
}

[data-theme="dark"] .print-sidebar label,
[data-theme="dark"] .print-sidebar h3 {
    color: var(--text-main);
}

[data-theme="dark"] #search-input {
    color: var(--text-main);
}

[data-theme="dark"] .input-group input,
[data-theme="dark"] .dynamic-item-row input,
[data-theme="dark"] select {
    color: var(--text-main);
    background: var(--input-bg);
    border-color: var(--border-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden; /* App like feel, no page scroll */
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: row;
}

/* BUTTONS */
button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    font-size: 1.2rem;
}

.icon-btn:active {
    transform: scale(0.92);
}

#page1 header .icon-btn:hover {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10B981 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: var(--accent-text, #ffffff);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.primary-btn:active {
    transform: scale(0.98);
}

.danger-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    border-radius: var(--radius-md);
}

button:hover, .primary-btn:hover, .danger-btn:hover, .upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
button:active, .primary-btn:active, .danger-btn:active, .upload-btn:active {
    transform: translateY(0);
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    position: relative;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    font-weight: 300;
    color: #10B981;
}

/* PAGES */
.page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* MAIN PAGE */
#page1 {
    position: relative;
    flex: 1;
    overflow: hidden;
    z-index: 1;
    transition: flex 0.4s;
}

.kroki-container {
    flex: 1;
    position: relative;
    overflow: auto; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; /* Azaltıldı, daha büyük harita için */
    background: var(--kroki-bg);
}

.kroki-wrapper {
    position: relative;
    background: var(--surface-solid);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    will-change: transform;
    transform-origin: center center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.placeholder-text {
    color: var(--text-muted);
    font-weight: 400;
    padding: 20px;
    text-align: center;
}

#kroki-img {
    max-width: 100%;
    max-height: calc(100vh - 120px); /* Ekranı olabildiğince doldursun */
    object-fit: contain;
    border-radius: var(--radius-md);
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* DRAWING AREA (SVG OVERLAY) */
.drawing-area {
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none; /* View mode default */
}

/* Polygons */
.zone-polygon {
    fill: rgba(0, 0, 0, 0.2);
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-linejoin: round;
    cursor: pointer;
    transition: fill 0.2s ease;
    pointer-events: auto; /* Always clickable */
}

.zone-polygon:hover {
    fill: rgba(0, 0, 0, 0.4);
}

.zone-polygon.selected {
    fill: rgba(0, 0, 0, 0.6);
    stroke: #ffffff;
    stroke-width: 3;
    stroke-dasharray: 5,5;
}

/* Drawing Mode Classes */
.mode-drawing .drawing-area {
    pointer-events: auto;
    cursor: crosshair;
}

.mode-drawing .zone-polygon {
    pointer-events: none; /* Don't interact with existing zones while drawing */
}

.drawing-point {
    fill: var(--accent-color);
    stroke: #ffffff;
    stroke-width: 2;
}

.drawing-line {
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-dasharray: 4,4;
}


/* SIDEBAR */
.sidebar {
    position: relative;
    width: 340px;
    height: 100%;
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    margin-left: -340px; /* Kapalıyken solda gizli */
    flex-shrink: 0;
    transition: margin-left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.sidebar.open {
    margin-left: 0; /* Açılınca ortaya çıkar ve haritayı iter */
}

/* Main Sidebar (Collapsible, 340px) */
#sidebar {
    position: relative;
    width: 340px;
    height: 100%;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-left: -340px; /* Hidden by default */
    transition: margin-left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

#sidebar.open {
    margin-left: 0; /* Açılınca yana doğru kayarak açılır */
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sidebar-logo span {
    font-weight: 500;
    color: #10B981 !important; /* Green accent color for Stock */
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    padding-left: 2px;
}

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

/* Adjust for #sidebar header */
#sidebar .sidebar-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    border-bottom: none;
    padding: 0;
}

.sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Adjust for #sidebar content */
#sidebar .sidebar-content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* DASHBOARD STATS CARDS */
.stat-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}


.setting-group {
    margin-bottom: 30px;
}

.setting-group h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
}

.upload-btn:hover {
    border-color: var(--accent-color);
    background: var(--bg-color);
}

.mode-switch {
    display: flex;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 4px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    color: var(--text-muted);
}

.mode-btn.active {
    background: var(--surface-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.instructions {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    background: #e8f4fd;
    padding: 10px;
    border-radius: 8px;
    color: #0277bd;
}

/* DETAIL PAGE (Page 2) */
.panel-page {
    position: relative;
    z-index: 20;
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 340px;
    height: 100%;
    margin-right: -340px; /* Kapalıyken sağda gizli */
    flex-shrink: 0;
    transition: margin-right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    box-shadow: -5px 0 20px rgba(0,0,0,0.05);
}

.panel-page.open {
    margin-right: 0; /* Açılınca haritayı sola iter */
}

.panel-container {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    pointer-events: auto; /* Pencerenin kendisine tıklanabilmesi için */
}

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

.panel-content {
    padding: 30px 20px;
    flex: 1;
    overflow-y: auto;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    background: var(--bg-color);
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
    cursor: pointer;
}

.input-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

/* ZOOM CONTROLS */
.zoom-controls {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

/* Panning cursors */
.mode-view .kroki-container {
    cursor: grab;
}
.mode-view .kroki-container:active {
    cursor: grabbing;
}

.kroki-wrapper {
    transform-origin: center center;
    will-change: transform;
}
.kroki-wrapper.smooth-transform {
    transition: transform 0.3s ease-out;
}

/* FLOOR LIST */
.floor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.floor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.floor-item:hover {
    border-color: var(--accent-color);
}

.floor-item.active {
    background: var(--surface-color);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.floor-item .floor-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floor-item .delete-floor-btn {
    color: var(--danger-color);
    padding: 5px;
    font-size: 1.1rem;
    opacity: 0.5;
}

.floor-item .delete-floor-btn:hover {
    opacity: 1;
}

/* UTILS */
.hidden {
    display: none !important;
}

/* DYNAMIC ITEMS */
.dynamic-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.dynamic-item-row input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    font-size: 1rem;
    min-width: 0; /* Prevent flex overflow */
}

.remove-item-btn {
    background: transparent;
    color: var(--danger-color);
    border: none;
    cursor: pointer;
    padding: 0 5px;
    font-size: 1.2rem;
}

.zone-items-list .info-item-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.zone-items-list .info-item-row:last-child {
    border-bottom: none;
}
.zone-items-list .info-item-name {
    font-weight: 500;
    color: var(--text-muted);
}
.zone-items-list .info-item-val {
    font-weight: 700;
    color: var(--text-main);
}

/* SEARCH & TOOLTIP & EXPORT */
#search-input:focus {
    border-color: var(--accent-color) !important;
    box-shadow: var(--shadow-sm);
    background: var(--surface-color) !important;
}

.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transform: translate(-50%, -100%);
    margin-top: -15px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip:not(.hidden) {
    opacity: 1;
}

.zone-polygon.zone-dimmed {
    opacity: 0.15;
}

.zone-polygon.zone-highlight {
    stroke: #FFEB3B !important;
    stroke-width: 4px !important;
    filter: drop-shadow(0 0 5px rgba(255,235,59,0.8));
    opacity: 1;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.hidden {
    display: none !important;
}
.modal-content {
    background: var(--surface-color);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
.modal-body {
    padding: 20px;
    line-height: 1.6;
}
.modal-body ol {
    padding-left: 20px;
}
.modal-body li {
    margin-bottom: 15px;
}

/* --- NEW MODULES --- */
/* LOGIN OVERLAY */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(10, 10, 20, 0.75) 0%, rgba(5, 5, 10, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
.login-overlay.hidden { display: none !important; }
.login-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 45px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0,0,0,0.05);
    width: 90%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
}
[data-theme="dark"] .login-box {
    box-shadow: var(--shadow-lg), 0 0 40px var(--accent-glow);
}
.login-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--text-main);
    margin: 0 auto 30px auto;
    text-align: center;
    line-height: 1;
}
.login-logo-img {
    max-width: 220px;
    height: auto;
    transition: filter 0.3s ease;
    display: block;
    margin: 0 auto;
}
[data-theme="dark"] .login-logo-img {
    filter: invert(1);
}
.login-box h2 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-main);
}
.login-box h2 span { 
    font-weight: 300; 
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}
.login-box .input-group { text-align: left; }
.error-text { color: var(--danger-color); font-size: 0.9rem; margin-top: 10px; font-weight: 600; }

/* HUB SCREEN */
.hub-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top, var(--surface-color) 0%, var(--bg-color) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    transition: background 0.3s ease;
}
.hub-screen.hidden { display: none !important; }
.hub-header { text-align: center; margin-bottom: 50px; }
.hub-header h2 { font-size: 2.5rem; margin-bottom: 10px; font-weight: 800; color: var(--text-main); }
.hub-header p { color: var(--text-muted); font-size: 1.1rem; }
.hub-cards {
    display: flex;
    gap: 30px;
    width: 90%;
    max-width: 1050px;
}
.hub-card {
    flex: 1;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.hub-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 10px 30px var(--accent-glow);
    border-color: var(--accent-color);
}
.hub-card i {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    transition: var(--transition);
    text-shadow: 0 0 20px var(--accent-glow);
}
.hub-card:hover i {
    transform: scale(1.1) rotate(2deg);
}
.hub-card h3 { font-size: 1.6rem; margin-bottom: 5px; font-weight: 800; color: var(--text-main); }
.hub-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin: 0; }

/* Hub Cards Color Themes (Stock = Green, Etiket = Red, Kartlık = Orange) */
#hub-stock-btn i {
    color: #10B981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}
#hub-stock-btn:hover {
    border-color: #10B981;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(16, 185, 129, 0.15);
}

#hub-print-btn i {
    color: #E31B23;
    text-shadow: 0 0 20px rgba(227, 27, 35, 0.1);
}
#hub-print-btn:hover {
    border-color: #E31B23;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(227, 27, 35, 0.15);
}

#hub-badge-btn i {
    color: #F26F21;
    text-shadow: 0 0 20px rgba(242, 111, 33, 0.1);
}
#hub-badge-btn:hover {
    border-color: #F26F21;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(242, 111, 33, 0.15);
}

#hub-admin-btn i {
    color: #8B5CF6;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}
#hub-admin-btn:hover {
    border-color: #8B5CF6;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(139, 92, 246, 0.15);
}

/* ===== PRINT SECTION - REDESIGN ===== */
#print-section {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

/* Ana layout: sol panel + sağ önizleme */
.print-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sol ayar paneli */
.print-settings-panel {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    overflow-y: auto;
}

.print-settings-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.print-settings-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.print-field {
    margin-bottom: 14px;
}

.print-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.print-select,
.print-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.print-select:focus,
.print-input:focus {
    border-color: var(--accent-color);
}

.print-action-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 10px;
}

.print-action-btn:hover { opacity: 0.9; }
.print-action-btn:active { transform: scale(0.98); }

/* Sağ önizleme paneli */
.print-preview-panel {
    flex: 1;
    background: #c8c8c8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Ölçeklenebilir canvas - JS ile boyutlandırılır */
.print-preview-canvas {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* A4 sayfa */
.print-page {
    background: #ffffff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    /* Boyutlar ve scale JS tarafından set edilir */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Fiyatlık template - sayfanın tamamını kaplar, ortalar */
.fiyatlik-template {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* Tek fiyat kutusu */
.fiyat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Fiyat satırı: büyük sayı + sağda kuruş/TL */
.fiyat-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    line-height: 1;
}

/* Büyük tam sayı */
.fiyat-tam {
    font-size: var(--fiyat-tam-size, 380px);
    font-weight: 900;
    font-style: normal;
    line-height: 0.85;
    letter-spacing: -15px;
    color: #231F20;
    font-family: 'Outfit', sans-serif;
}

/* Kuruş + TL grubu - baseline hizalı */
.fiyat-sag {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    padding-bottom: 25px;
    margin-left: -20px;
}

/* ,99 */
.fiyat-kurus {
    font-size: var(--fiyat-kurus-size, 55px);
    font-weight: 900;
    font-style: normal;
    line-height: 1;
    color: #231F20;
    letter-spacing: -3px;
    font-family: 'Outfit', sans-serif;
}

/* TL */
.fiyat-para {
    font-size: var(--fiyat-para-size, 42px);
    font-weight: 900;
    font-style: normal;
    line-height: 1;
    color: #231F20;
    margin-left: 0px;
    letter-spacing: -2px;
    font-family: 'Outfit', sans-serif;
}

/* Üst yazı (HEPSİ | ALL) */
.fiyat-ust-yazi {
    font-size: var(--fiyat-ust-size, 60px);
    font-weight: 700;
    font-style: normal;
    color: #231F20;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Barlow Condensed', 'Outfit', sans-serif;
}

/* Alt yazı ('den başlayan) */
.fiyat-alt-yazi {
    font-size: var(--fiyat-alt-size, 20px);
    font-weight: 400;
    font-style: normal;
    color: #231F20;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 16px;
    font-family: 'Barlow Condensed', 'Outfit', sans-serif;
}

/* BEDEN AYRIMI TEMPLATE */
.beden-ayrimi-template {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    background: #ffffff;
}

.beden-ayrimi-template.single-page {
    flex-direction: column;
}

.beden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.beden-ayrimi-template:not(.single-page) .beden-left {
    border-right: 1px dashed #ccc;
}

.beden-main-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: var(--beden-main-size, 140pt);
    color: #231F20;
    margin-top: 45mm; /* roughly 5cm from top */
    line-height: 1;
    text-align: center;
    width: 100%;
    letter-spacing: -2px;
    white-space: nowrap;
}

.beden-sub-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: var(--beden-sub-size, 24pt);
    color: #231F20;
    margin-top: 20mm;
    text-align: center;
    letter-spacing: 1px;
}

.beden-brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: var(--beden-brand-size, 16pt);
    color: #231F20;
    position: absolute;
    bottom: 50mm; /* roughly 15.4cm from top = 21cm - 15.4cm = 5.6cm */
    text-align: center;
    width: 100%;
    letter-spacing: 1px;
}

/* MEDIA PRINT */
/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
    position: relative;
    overflow: hidden;
}
.theme-toggle-btn i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.theme-toggle-btn.animating i {
    transform: rotate(360deg);
}

/* TOAST NOTIFICATION */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-main);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    border: 1px solid var(--border-color);
    pointer-events: none;
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-notification .toast-icon {
    font-size: 1.2rem;
    color: #4CAF50;
}

/* ZONE HISTORY MODAL */
.history-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.history-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}
.history-item {
    position: relative;
    padding: 12px 15px 12px 45px;
    margin-bottom: 8px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.history-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}
.history-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 18px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 2px solid var(--surface-color);
    z-index: 1;
}
.history-item .history-user {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-color);
}
.history-item .history-action {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 4px 0;
}
.history-item .history-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    word-break: break-word;
}
.history-item .history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 10px;
    font-style: italic;
}

/* COPY/PASTE ACTION BUTTONS */
.action-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.action-btn-group button {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-main);
    transition: var(--transition);
}
.action-btn-group button:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}
.action-btn-group button.copy-btn i { color: #2196F3; }
.action-btn-group button.paste-btn i { color: #4CAF50; }
.action-btn-group button.history-btn i { color: #FF9800; }
.action-btn-group button.paste-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.action-btn-group button.paste-btn:disabled:hover {
    border-color: var(--border-color);
    box-shadow: none;
}

@media print {
    body * { visibility: hidden; }

    .print-preview-panel,
    .print-preview-panel * {
        visibility: visible !important;
    }

    .print-preview-panel {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 9999 !important;
    }

    .print-preview-canvas {
        transform: none !important;
    }

    .print-page {
        transform: none !important;
        width: 210mm !important;
        height: 297mm !important;
        box-shadow: none !important;
    }

    .print-page.landscape {
        width: 297mm !important;
        height: 210mm !important;
    }

    .print-page.a5 {
        width: 148mm !important;
        height: 210mm !important;
    }

    .print-page.a5.landscape {
        width: 210mm !important;
        height: 148mm !important;
    }

    .fiyat-tam {
        font-size: var(--fiyat-tam-print, 380px) !important;
    }
    .fiyat-kurus {
        font-size: var(--fiyat-kurus-print, 55px) !important;
    }
    .fiyat-para {
        font-size: var(--fiyat-para-print, 42px) !important;
    }
    .fiyat-ust-yazi {
        font-size: var(--fiyat-ust-print, 60px) !important;
    }
    .fiyat-alt-yazi {
        font-size: var(--fiyat-alt-print, 20px) !important;
    }

    .beden-ayrimi-template:not(.single-page) .beden-left {
        border-right: none !important;
    }

    .beden-main-text {
        font-size: var(--beden-main-print, 140pt) !important;
    }
    .beden-sub-text {
        font-size: var(--beden-sub-print, 24pt) !important;
    }
    .beden-brand-text {
        font-size: var(--beden-brand-print, 16pt) !important;
    }

    @page { size: auto; margin: 0; }
}

/* Premium Help Modal Styling */
.help-modal-premium {
    max-width: 650px !important;
    border: 1px solid var(--border-color);
    background: var(--surface-solid) !important;
    backdrop-filter: blur(10px);
}
.help-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-top: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}
.help-role-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.help-role-badge {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
}
.help-role-admin {
    background: rgba(227, 27, 35, 0.1);
    color: var(--brand-red);
    border-color: rgba(227, 27, 35, 0.2);
}
.help-role-editor {
    background: rgba(242, 111, 33, 0.1);
    color: #F26F21;
    border-color: rgba(242, 111, 33, 0.2);
}
.help-role-viewer {
    background: rgba(120, 120, 120, 0.1);
    color: var(--text-muted);
    border-color: var(--border-color);
}
.help-steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 500px) {
    .help-steps-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.help-step-card {
    background: var(--bg-color);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}
.help-step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.help-step-icon {
    background: var(--surface-solid);
    padding: 8px;
    border-radius: 10px;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
}
.help-step-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}
.help-step-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- PAGE LOADER / SPLASH SCREEN --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--loader-bg); /* Dynamic theme-based background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 1;
    visibility: visible;
}
.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.loader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
}
.loader-svg {
    width: 160px;
    height: 160px;
}
.spinner-path {
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px var(--loader-spin));
    animation: trace-d-shape 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.loader-text {
    color: #8c8c9e;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: loader-fade-text 1.5s infinite ease-in-out;
}

@keyframes trace-d-shape {
    0% {
        stroke-dasharray: 1 220;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 110 220;
        stroke-dashoffset: -40;
    }
    100% {
        stroke-dasharray: 1 220;
        stroke-dashoffset: -220;
    }
}
@keyframes loader-fade-text {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- LANGUAGE SELECTOR --- */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(120, 120, 120, 0.05);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.lang-btn:hover {
    color: var(--text-main);
    background: rgba(120, 120, 120, 0.08);
}
.lang-btn.active {
    background: var(--surface-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .lang-btn.active {
    background: var(--surface-solid);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,255,255,0.05);
}

/* --- HUB SCREEN HEADER CONTROLS --- */
.hub-header-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 9001;
    display: flex;
    align-items: center;
    gap: 12px;
}
/* --- PREMIUM LANGUAGE DROPDOWN --- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}
.lang-dropdown-btn {
    height: 48px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0 16px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.lang-dropdown-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.lang-dropdown-btn i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.lang-dropdown.show .lang-dropdown-btn i {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px;
    min-width: 170px;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0,0,0,0.08);
    display: none;
    z-index: 9999;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-dropdown-menu.show {
    display: block !important;
}

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

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
}
.lang-dropdown-item:hover {
    background: rgba(120, 120, 120, 0.08);
    color: var(--text-main);
}
.lang-dropdown-item.active {
    background: rgba(139, 92, 246, 0.08);
    color: #8B5CF6;
}
[data-theme="dark"] .lang-dropdown-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.lang-flag {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.active-lang-flag {
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.hub-header-controls .icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px; /* Smooth rounded corners instead of circle */
    background: var(--surface-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.hub-header-controls .icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}
.hub-header-controls .icon-btn:active {
    transform: scale(0.95) translateY(0);
}
.hub-header-controls .icon-btn i {
    font-size: 1.15rem;
}

/* --- HUB CARDS DECORATIVE TOP BORDERS & GRID LAYOUT --- */
.hub-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 24px;
    width: 95% !important;
    max-width: 1200px !important;
}

.hub-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    padding: 50px 30px !important;
}



/* --- HUB STORE BADGE --- */
.hub-store-badge {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 9001;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0 20px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
}

.hub-store-badge i {
    color: var(--brand-red);
    font-size: 1rem;
}

.hub-store-badge.hidden {
    display: none !important;
}

[data-theme="dark"] .hub-store-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Hub screen header elements responsiveness & overflow prevention */
.store-name-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    display: inline-block;
}

@media (max-width: 768px) {
    .hub-store-badge {
        top: 15px;
        left: 15px;
        height: 40px;
        padding: 0 14px;
        font-size: 0.8rem;
    }
    .store-name-display {
        max-width: 140px;
    }
    .hub-header-controls {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
    .lang-dropdown-btn {
        height: 40px;
        padding: 0 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hub-store-badge {
        top: 10px;
        left: 10px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.75rem;
        gap: 6px;
    }
    .store-name-display {
        max-width: 90px;
    }
    .hub-header-controls {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    .lang-dropdown-btn {
        height: 36px;
        padding: 0 8px;
        font-size: 0.75rem;
        gap: 4px;
    }
}

/* Modern & Aesthetic SweetAlert2 Overrides */
.swal2-popup {
    font-family: 'Outfit', sans-serif !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.05) !important;
    padding: 30px 24px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .swal2-popup {
    background-color: #1e1e24 !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.swal2-title {
    font-weight: 800 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.35rem !important;
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    color: var(--text-main, #1f2937) !important;
}

[data-theme="dark"] .swal2-title {
    color: #f3f4f6 !important;
}

.swal2-html-container {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem !important;
    color: var(--text-muted, #6b7280) !important;
    line-height: 1.5 !important;
}

[data-theme="dark"] .swal2-html-container {
    color: #9ca3af !important;
}

.swal2-close {
    font-size: 1.8rem !important;
    font-weight: 300 !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    color: #9ca3af !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
}

.swal2-close:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #ef4444 !important;
}

[data-theme="dark"] .swal2-close:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.swal2-close:focus {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.swal2-confirm {
    background-color: #8B5CF6 !important;
    border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    padding: 10px 24px !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.2), 0 2px 4px -1px rgba(139, 92, 246, 0.1) !important;
}

.swal2-cancel {
    border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    padding: 10px 24px !important;
    font-size: 0.9rem !important;
}

.swal2-icon {
    transform: scale(0.85);
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}



/* Premium Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #F2AF21;
    box-shadow: 0 0 0 4px rgba(242, 175, 33, 0.15);
    background-color: var(--surface-color);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Chrome autofill styling fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px var(--bg-color) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Modal Content Aesthetics */
.modal-content {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 24px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-body {
    padding: 24px;
}

/* Button enhancements */
.primary-btn {
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

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

/* SweetAlert2 z-index override to ensure it is always above all custom modals */
.swal2-container {
    z-index: 999999 !important;
}
