:root {
    --auth-bg-a: #f4f7ff;
    --auth-bg-b: #e8f6ef;
    --auth-bg-c: #fef6ea;
    --auth-card-bg: rgba(255, 255, 255, 0.88);
    --auth-border: rgba(19, 57, 91, 0.14);
}

html, body { margin: 0; min-height: 100%; }
body { font-family: "Segoe UI", "Inter", sans-serif; background: #f4f6fb; }
h1:focus { outline: none; }
.validation-message { color: #c62828; font-size: 0.85rem; }

.toolhub-topbar {
    background: linear-gradient(90deg, #0a2a43 0%, #114b6b 45%, #1d7874 100%);
    color: #eff8ff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.user-dropdown { position: relative; }
.user-dropdown-trigger {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
}
.user-dropdown-trigger::-webkit-details-marker { display: none; }
.user-badge-icon { font-size: 16px; line-height: 1; }
.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
    padding: 6px;
    z-index: 15;
}
.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.user-dropdown-item:hover { background: #eef2ff; }
.user-dropdown-form { margin: 0; }
.user-dropdown-button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    font: inherit;
}
.user-dropdown-button:hover { background: #fef2f2; }

.toolhub-drawer {
    background: linear-gradient(180deg, #081f33 0%, #0b3048 55%, #16425b 100%);
    color: #d9ecff;
}

.toolhub-nav-root { min-height: 100%; padding: 10px; }
.toolhub-side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.18);
}
.toolhub-side-brand-icon { color: #78e3d8; }
.toolhub-side-brand-title { color: #f2fbff; font-weight: 800; line-height: 1; }
.toolhub-side-brand-sub { color: #9ec9ea; }

.toolhub-nav-title { color: #94c9ff; padding: 0 10px 8px; letter-spacing: 1.4px; }
.toolhub-drawer .mud-nav-link { color: #e5f0ff; }
.toolhub-drawer .mud-nav-link.active { background: rgba(107, 185, 255, 0.22); color: #ffffff; }
.toolhub-drawer .mud-nav-link:hover { background: rgba(255, 255, 255, 0.1); }

.toolhub-drawer-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 10px 4px;
    color: #9ec9ea;
}

.toolhub-content {
    padding: 88px 24px 24px;
    background:
        radial-gradient(circle at 85% 5%, rgba(52, 152, 219, 0.14) 0, rgba(52, 152, 219, 0) 36%),
        radial-gradient(circle at 5% 20%, rgba(29, 120, 116, 0.12) 0, rgba(29, 120, 116, 0) 30%),
        #f4f6fb;
    min-height: 100vh;
}

.blazor-error-boundary { background: #b3261e; color: #fff; border-radius: 12px; padding: 1rem 1.25rem; }

.auth-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    background:
        radial-gradient(circle at 10% 20%, rgba(76, 110, 245, 0.16) 0, rgba(76, 110, 245, 0) 40%),
        radial-gradient(circle at 90% 15%, rgba(46, 196, 182, 0.18) 0, rgba(46, 196, 182, 0) 36%),
        linear-gradient(140deg, var(--auth-bg-a) 0%, var(--auth-bg-b) 55%, var(--auth-bg-c) 100%);
}

.auth-panel {
    width: min(560px, 95vw); border-radius: 22px; background: var(--auth-card-bg); backdrop-filter: blur(6px);
    border: 1px solid var(--auth-border); box-shadow: 0 24px 50px rgba(30, 41, 59, 0.14);
}

.auth-card { padding: 28px; background: transparent; }
.auth-checkbox-row { display: flex; align-items: center; gap: 10px; cursor: pointer; color: rgba(0, 0, 0, 0.75); }
.auth-checkbox { width: 18px; height: 18px; accent-color: #594ae2; }
.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.auth-field label { font-size: 0.875rem; color: rgba(0, 0, 0, 0.7); }
.auth-input {
    height: 56px; border: 1px solid rgba(0, 0, 0, 0.32); border-radius: 4px; padding: 16px 14px;
    font-size: 1rem; outline: none; background: rgba(255, 255, 255, 0.94);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.auth-input:focus { border-color: #594ae2; box-shadow: 0 0 0 1px #594ae2; }

@media (max-width: 600px) {
    .auth-shell { padding: 14px; }
    .auth-card { padding: 20px; }
}

.selected-product-row {
    background: rgba(13, 110, 253, 0.12);
}

.edited-product-row {
    background: rgba(255, 152, 0, 0.12);
}

.shoptet-html-preview {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
}

.shoptet-preview-frame {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    height: auto;
    max-height: none;
}

.shoptet-preview-frame-short { min-height: 0; }
.shoptet-preview-frame-long { min-height: 0; }

.shoptet-editor-frame {
    min-height: 520px;
}

.shoptet-editor-frame-resizable {
    resize: vertical;
    overflow: auto;
    display: block;
    min-height: 360px;
    max-height: 1200px;
}


.long-raw-editor textarea {
    resize: vertical !important;
    min-height: 360px;
    max-height: 1200px;
}

.shoptet-page .shoptet-toolbar {
    border: 1px solid rgba(9, 30, 66, 0.08);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 251, 255, 0.96) 100%);
}

.shoptet-left-panel,
.shoptet-editor-panel {
    border: 1px solid rgba(9, 30, 66, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
}

.shoptet-products-table .mud-table-container {
    max-height: 66vh;
    border-radius: 10px;
}

.shoptet-products-table .mud-table-head {
    background: rgba(17, 75, 107, 0.06);
}

.shoptet-detail-tabs .mud-tabs-toolbar {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(9, 30, 66, 0.08);
}

.shoptet-detail-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
}

.label-preview-canvas {
    padding: 16px;
    border: 1px dashed rgba(9, 30, 66, 0.2);
    border-radius: 10px;
    background: repeating-linear-gradient(
        45deg,
        rgba(15, 47, 74, 0.02),
        rgba(15, 47, 74, 0.02) 8px,
        rgba(45, 127, 249, 0.02) 8px,
        rgba(45, 127, 249, 0.02) 16px
    );
    display: inline-flex;
}

.label-pdf-preview-frame {
    width: 60mm;
    height: 40mm;
    border: 0;
    background: #fff;
}
