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

:root {
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    --border: #e2e5ea;
    --text: #1a2332;
    --text-muted: #6b7a8d;
    --primary: #2563eb;
    --primary-hover: #1d4fd8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #059669;
    --accent: #7c3aed;
    --sidebar-w: 240px;
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2f7 0%, #e0e7f0 100%);
}

.login-container {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 44px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
}

.login-brand, .sidebar-brand {
    text-align: center;
    margin-bottom: 30px;
}

.brand-falls {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.brand-concept {
    font-size: 24px;
    font-weight: 300;
    color: var(--text);
}

.login-brand small, .sidebar-brand small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

.login-error {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.login-form input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    box-shadow: 1px 0 3px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 2px;
}

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

.nav-item.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .logout {
    color: var(--danger);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 32px;
    max-width: 1100px;
}

/* Flash Message */
.flash-message {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--primary);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacts-icon { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.total-icon { background: rgba(124, 58, 237, 0.1); color: var(--accent); }
.products-icon { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.gallery-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-number {
    font-size: 24px;
    font-weight: 700;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Buttons */
.btn-admin {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-hover);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-admin:hover {
    background: var(--border);
}

.btn-primary-admin {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary-admin:hover {
    background: var(--primary-hover);
}

.btn-danger-admin {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-danger-admin:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm-admin {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.input-admin {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-admin:focus {
    outline: none;
    border-color: var(--primary);
}

.input-sm {
    padding: 6px 10px;
    font-size: 13px;
}

.form-group-admin {
    margin-bottom: 16px;
}

.form-group-admin label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-row-admin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-inline {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.spec-edit-group label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(77, 168, 218, 0.15);
    color: var(--primary);
}

.badge-new {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* Contact Rows */
.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.contact-row.unread { font-weight: 600; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-email {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.contact-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Contact Cards */
.contact-card.unread {
    border-left: 3px solid var(--primary);
}

.contact-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.contact-header-row h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-email-display {
    color: var(--text-muted);
    font-size: 13px;
}

.contact-date-display {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.contact-details-grid {
    display: flex;
    gap: 24px;
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.contact-message {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.contact-message strong {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.contact-actions {
    display: flex;
    gap: 8px;
}

/* Gallery Admin */
.gallery-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.gallery-card-admin {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.gallery-card-admin.wide {
    grid-column: span 2;
}

.gallery-preview {
    height: 160px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.gallery-overlay-admin {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.gallery-overlay-admin span {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.gallery-overlay-admin small {
    font-size: 12px;
    opacity: 0.8;
}

.gallery-edit {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-actions {
    display: flex;
    gap: 8px;
}

.delete-form {
    padding: 0 12px 12px;
}

/* Product Card */
.product-card .product-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* Hint */
.hint {
    color: var(--text-muted);
    font-size: 13px;
}

.hint code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Page Header Row */
.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Product List Grid */
.products-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.product-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
}

.product-list-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.product-list-thumb {
    height: 160px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.product-list-thumb .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.product-list-info {
    padding: 16px;
}

.product-list-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.product-list-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-list-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 8px;
}

.product-list-meta .no-price {
    color: var(--text-muted);
}

.product-list-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Product Tabs */
.product-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Variations */
.variations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.variation-card .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Price Input */
.price-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.price-prefix {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.price-input {
    padding-left: 30px !important;
}

.price-input-sm {
    max-width: 150px;
}

/* Image Previews */
.current-image-preview {
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 400px;
}

.current-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.image-preview-sm {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}

.image-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg);
}

.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-delete {
    position: absolute;
    top: 4px;
    right: 4px;
}

.thumb-delete-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-delete-btn:hover {
    background: var(--danger);
}

/* Reviews */
.reviews-list {
    margin-top: 16px;
}

.review-card {
    margin-bottom: 12px;
}

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

.star-rating {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.star {
    color: var(--border);
    font-size: 16px;
}

.star.filled {
    color: #f59e0b;
}

.review-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Shipping Table */
.shipping-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shipping-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.shipping-header {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
}

/* Admin Table */
.table-admin {
    width: 100%;
    border-collapse: collapse;
}

.table-admin th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table-admin td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

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

/* ===================== */
/* PORTAL LIGHT THEME    */
/* ===================== */
body.portal-page {
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    --border: #e2e5ea;
    --text: #1a2332;
    --text-muted: #6b7a8d;
    --primary: #2563eb;
    --primary-hover: #1d4fd8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #059669;
    --accent: #7c3aed;
    --radius: 10px;
    background: var(--bg);
    color: var(--text);
}

body.portal-page .login-page {
    background: linear-gradient(135deg, #eef2f7 0%, #e0e7f0 100%);
}

body.portal-page .login-container {
    background: #fff;
    border: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 16px;
    padding: 44px;
}

body.portal-page .login-form input {
    background: #f5f7fa;
    border: 1.5px solid #e2e5ea;
    color: #1a2332;
    border-radius: 10px;
    padding: 12px 16px;
}

body.portal-page .login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

body.portal-page .login-form label {
    color: #4b5563;
    font-weight: 500;
}

body.portal-page .brand-falls {
    color: var(--primary);
}

body.portal-page .brand-concept {
    color: #1a2332;
}

/* Portal Header */
body.portal-page .portal-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e5ea;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}

body.portal-page .portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.portal-page .portal-brand .brand-home {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: baseline;
    border-radius: 6px;
    transition: opacity 0.15s;
}
body.portal-page .portal-brand .brand-home:hover { opacity: 0.65; }
body.portal-page .portal-brand .brand-home:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

body.portal-page .portal-brand .brand-falls { font-size: 20px; font-weight: 700; }
body.portal-page .portal-brand .brand-concept { font-size: 20px; font-weight: 300; }
body.portal-page .portal-brand small {
    color: #94a3b8;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #e2e5ea;
}

body.portal-page .portal-nav {
    display: flex;
    gap: 2px;
    align-items: center;
    height: 100%;
}

body.portal-page .portal-nav a {
    color: #6b7a8d;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s;
    position: relative;
}

body.portal-page .portal-nav a:hover {
    background: #f0f2f5;
    color: #1a2332;
}

body.portal-page .portal-nav a.active {
    background: rgba(37,99,235,0.08);
    color: var(--primary);
    font-weight: 600;
}

body.portal-page .portal-nav a.logout {
    color: #dc2626;
    margin-left: 8px;
}

body.portal-page .portal-nav a.logout:hover {
    background: rgba(220,38,38,0.06);
}

/* Language picker — sits left of the menu */
body.portal-page .portal-lang {
    margin-left: auto;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

body.portal-page .portal-lang select {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7a8d' d='M2.5 4.5 6 8l3.5-3.5z'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
    border: 1px solid #e2e5ea;
    border-radius: 8px;
    padding: 7px 26px 7px 10px;
    color: #6b7a8d;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

body.portal-page .portal-lang select:hover {
    background-color: #f0f2f5;
    color: #1a2332;
}

body.portal-page .portal-lang select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

/* Portal Content */
body.portal-page .portal-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

body.portal-page .portal-welcome {
    margin-bottom: 28px;
}

body.portal-page .portal-welcome h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.3px;
}

body.portal-page .portal-welcome p {
    color: #6b7a8d;
    font-size: 14px;
    margin-top: 4px;
}

/* Portal Cards */
body.portal-page .card {
    background: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    margin-bottom: 24px;
}

body.portal-page .card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f2f5;
}

body.portal-page .card-header h2 {
    font-size: 15px;
    font-weight: 650;
    color: #1a2332;
}

/* Portal Buttons */
body.portal-page .btn-admin {
    border-radius: 10px;
    font-weight: 500;
    border: 1.5px solid #e2e5ea;
    background: #fff;
    color: #374151;
    transition: all 0.15s;
}

body.portal-page .btn-primary-admin {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(37,99,235,0.2);
}

body.portal-page .btn-primary-admin:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
    transform: translateY(-1px);
}

/* Portal Inputs */
body.portal-page .input-admin,
body.portal-page .lang-select,
body.portal-page select.input-admin {
    background: #f8f9fb;
    border: 1.5px solid #e2e5ea;
    border-radius: 10px;
    color: #1a2332;
    padding: 10px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

body.portal-page .input-admin:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
    background: #fff;
}

body.portal-page .form-group-admin label {
    color: #4b5563;
    font-weight: 500;
    font-size: 13px;
}

/* Portal Flash */
body.portal-page .flash-message {
    background: rgba(37,99,235,0.06);
    border: 1px solid rgba(37,99,235,0.15);
    color: var(--primary);
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 500;
}

/* Portal Tools Grid (Dashboard) */
body.portal-page .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

body.portal-page .tool-card {
    background: #fff;
    border: 1.5px solid #e2e5ea;
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: #1a2332;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

body.portal-page .tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37,99,235,0.08);
    transform: translateY(-2px);
}

body.portal-page .tool-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

body.portal-page .tool-card p {
    font-size: 13px;
    color: #6b7a8d;
}

/* Price Table (Dashboard) */
body.portal-page .price-table th {
    color: #6b7a8d;
    font-size: 11px;
    border-bottom: 2px solid #e2e5ea;
}

body.portal-page .price-table td {
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}

body.portal-page .price-order {
    color: var(--primary);
    font-weight: 600;
}

body.portal-page .sell-input {
    background: #f8f9fb;
    border: 1.5px solid #e2e5ea;
    border-radius: 8px;
    color: #1a2332;
}

body.portal-page .sell-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

body.portal-page .vat-row {
    background: #f8f9fb;
    border-radius: 10px;
}

body.portal-page .vat-rate-input {
    background: #fff;
    border: 1.5px solid #e2e5ea;
    border-radius: 8px;
    color: #1a2332;
}

body.portal-page .discount-badge {
    background: rgba(5,150,105,0.08);
    color: var(--success);
}

/* Hint */
body.portal-page .hint {
    color: #94a3b8;
}

body.portal-page .hint code {
    background: #f0f2f5;
    color: #6b7a8d;
}

/* Portal hamburger button — hidden on desktop */
body.portal-page .portal-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 60;
}
body.portal-page .portal-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1a2332;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* Portal mobile menu */
@media (max-width: 768px) {
    body.portal-page .portal-header {
        padding: 0 16px;
        position: relative;
        overflow: visible;
    }
    body.portal-page .portal-brand small {
        display: none;
    }
    body.portal-page .portal-menu-toggle {
        display: flex;
    }
    body.portal-page .portal-lang {
        margin-right: 4px;
    }
    body.portal-page .portal-lang select {
        padding: 6px 24px 6px 8px;
        font-size: 12.5px;
        max-width: 130px;
    }
    body.portal-page .portal-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px 12px;
        border-top: 1px solid #e2e5ea;
        background: #ffffff;
        z-index: 60;
        box-shadow: 0 6px 16px rgba(0,0,0,0.10);
    }
    body.portal-page .portal-nav.open {
        display: flex;
    }
    body.portal-page .portal-nav a {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 15px;
    }
    body.portal-page .portal-nav a.logout {
        margin-left: 0;
        margin-top: 4px;
        border-top: 1px solid #e2e5ea;
        border-radius: 0;
        padding-top: 12px;
    }
    body.portal-page .portal-content {
        padding: 16px;
    }
    body.portal-page .portal-welcome h1 {
        font-size: 20px;
    }
    body.portal-page .tools-grid {
        grid-template-columns: 1fr;
    }
    body.portal-page .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-brand {
        border-bottom: none;
        padding: 12px 16px;
    }

    .sidebar-nav {
        display: flex;
        gap: 4px;
        padding: 8px;
        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
        padding: 8px 12px;
    }

    .sidebar-footer {
        display: flex;
        gap: 4px;
        padding: 8px;
        border-top: none;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .admin-layout {
        flex-direction: column;
    }

    .form-row-admin {
        grid-template-columns: 1fr;
    }

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

    .gallery-card-admin.wide {
        grid-column: span 1;
    }
}
