:root {
    --primary: #0d6efd;
    --dark: #212529;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

/* Admin sidebar */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 250px;
    background: var(--dark);
    color: #fff;
    padding-top: 1rem;
    flex-shrink: 0;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    transition: all 0.2s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    background: var(--light-bg);
    overflow-y: auto;
}

/* QR Code */
.qr-preview {
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-preview img {
    max-width: 300px;
    height: auto;
}

/* Visitor page */
.page-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #495057 100%);
    color: #fff;
    padding: 3rem 0;
}

/* Icon navigation (replaces accordion) */
.icon-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.icon-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 100px;
    position: relative;
}

.icon-nav-item:hover {
    border-color: var(--primary);
    background: rgba(13, 110, 253, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.12);
}

.icon-nav-item.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.25);
}

.icon-nav-icon {
    font-size: 1.75rem;
}

.icon-nav-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.icon-nav-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icon-nav-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.icon-nav-item.active .icon-nav-count {
    background: #fff;
    color: var(--primary);
}

.icon-panels {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.icon-panel {
    display: none;
    padding: 1.5rem;
    animation: panelSlideDown 0.3s ease;
}

.icon-panel.show {
    display: block;
}

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

.icon-panel-section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.icon-panel-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.icon-panel-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Product Tree Sidebar */
.product-tree {
    position: sticky;
    top: 70px;
}

.product-tree .card-header {
    background: var(--dark);
    color: #fff;
    font-weight: 600;
}

.product-tree-list .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.product-tree-list .list-group-item:hover {
    background: rgba(13, 110, 253, 0.05);
    border-left-color: var(--primary);
}

.product-tree-list .list-group-item.active {
    background: var(--primary);
    border-left-color: var(--primary);
    color: #fff;
}

.product-tree-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Order form honeypot */
.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Parts table */
.parts-table td { vertical-align: middle; }
.parts-table input.form-control-sm { font-size: 0.85rem; }
.part-num { font-weight: 600; color: #6c757d; width: 40px; text-align: center; }

/* Admin parts list table */
.parts-admin-table td { vertical-align: middle; padding: 0.25rem; }
.parts-admin-table input.form-control-sm { font-size: 0.8rem; }
