:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Paleta jasna */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-input: #ffffff;
    --bg-subtle: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-subtle: #94a3b8;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-subtle: #eff6ff;
    --primary-border: #bfdbfe;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-dropdown: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

[data-theme="dark"] {
    --bg-page: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-input: #0f172a;
    --bg-subtle: #1e293b;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-subtle: rgba(59, 130, 246, 0.15);
    --primary-border: rgba(59, 130, 246, 0.3);
    
    --border-color: #1f2937;
    --border-hover: #374151;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-dropdown: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* TOPBAR */
.topbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    white-space: nowrap;
    flex-shrink: 0;
}

.brand h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

/* NAWIGACJA */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.dropdown {
    position: relative;
    flex-shrink: 0;
}

.dropdown-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.825rem;
    font-weight: 600;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.dropdown-btn:hover, .dropdown.open .dropdown-btn {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    border-color: var(--border-color);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background-color: var(--bg-surface-elevated);
    min-width: 240px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    padding: 6px;
    z-index: 100;
    animation: menuSlideIn 0.15s ease-out forwards;
}

.dropdown.open .dropdown-content {
    display: block;
}

@keyframes menuSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    padding: 9px 12px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease;
}

.dropdown-content a:hover {
    background-color: var(--primary-subtle);
    color: var(--primary);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-toggle, .btn-clear {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.theme-toggle:hover, .btn-clear:hover {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    border-color: var(--border-hover);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* OBSZAR ROBOCZY */
.main-container {
    max-width: 860px;
    width: 100%;
    margin: 36px auto;
    padding: 0 20px;
    flex: 1;
    transition: max-width 0.25s ease;
}

.main-container.wide-mode {
    max-width: 96%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: contentFade 0.2s ease-in-out;
}

@keyframes contentFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* KARTY */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    text-align: left;
}

.card-header-center {
    text-align: center;
    margin-bottom: 24px;
}

.card-icon {
    font-size: 2.5rem;
    display: inline-block;
    margin-bottom: 12px;
}

.card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 6px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FORMULARZE */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-input);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

input[type="file"] {
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    background-color: var(--bg-subtle);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.action-btn {
    width: 100%;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, transform 0.05s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background-color: var(--primary-hover);
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* MODUŁ CAD PRO */
.cad-input-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.cad-load-btn {
    width: auto;
    white-space: nowrap;
    padding: 11px 24px;
}

.cad-viewer-wrapper {
    margin-top: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #0b0f19;
    box-shadow: var(--shadow-lg);
}

.cad-toolbar {
    background-color: #111827;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cad-tool-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.cad-btn {
    background-color: #1f2937;
    color: #f1f5f9;
    border: 1px solid #374151;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s ease;
    user-select: none;
}

.cad-btn:hover {
    background-color: #374151;
    border-color: #4b5563;
}

.cad-tool-btn.active {
    background-color: #3b82f6 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.cad-btn-primary {
    background-color: #2563eb;
    border-color: #3b82f6;
}

.cad-btn-primary:hover {
    background-color: #1d4ed8;
}

.cad-btn-success {
    background-color: #15803d;
    border-color: #22c55e;
}

.cad-btn-success:hover {
    background-color: #166534;
}

/* PŁÓTNO KREŚLARSKIE */
.cad-canvas {
    height: 72vh;
    min-height: 520px;
    width: 100%;
    background-color: #0f172a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 24px 24px;
    overflow: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
}

.cad-canvas.mode-measure {
    cursor: crosshair !important;
}

.cad-canvas.panning {
    cursor: grabbing !important;
}

.cad-measure-hud {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    box-shadow: var(--shadow-md);
    pointer-events: none;
}

.cad-hud-divider {
    color: #94a3b8;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 12px;
}

.cad-hud-val {
    color: #38bdf8;
    font-weight: 700;
}

#cadSvgTarget {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cadSvgTarget svg {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
}

#cadSvgTarget svg path,
#cadSvgTarget svg line,
#cadSvgTarget svg polyline,
#cadSvgTarget svg polygon,
#cadSvgTarget svg circle {
    vector-effect: non-scaling-stroke;
}

/* PROFILE AI */
.profiles-container {
    margin-top: 16px;
}

.profile-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.profile-card-item {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.profile-card-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.badge-system {
    background-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.btn-delete-profile {
    background-color: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-delete-profile:hover {
    background-color: #ef4444;
    color: #ffffff;
}

.profile-keywords-preview {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* STATUSY ZADAŃ */
.status-box {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    border: 1px solid transparent;
}

.status-box.active {
    display: block;
}

.status-box.info {
    background-color: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}

[data-theme="dark"] .status-box.info {
    background-color: rgba(3, 105, 161, 0.2);
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.3);
}

.status-box.success {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

[data-theme="dark"] .status-box.success {
    background-color: rgba(21, 128, 61, 0.2);
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.3);
}

.status-box.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

[data-theme="dark"] .status-box.error {
    background-color: rgba(185, 28, 28, 0.2);
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.3);
}

/* DOLNE KARTY METRYK */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.stats-card, .info-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stats-card h3, .info-card h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-item {
    background-color: var(--bg-subtle);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item strong {
    color: var(--text-main);
    font-weight: 700;
}

.info-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.info-card code {
    display: block;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--primary);
    font-family: monospace;
    margin-bottom: 8px;
    word-break: break-all;
}

/* STOPKA */
.footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-subtle);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    margin-top: auto;
}

.footer-phone {
    font-weight: 600;
    color: var(--text-muted);
}

/* SYSTEM AUTORYZACJI & MODAL */
.btn-auth {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    border: 1px solid transparent;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-auth:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-sm);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.tier-pill {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tier-pill.free {
    background-color: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.tier-pill.pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.tier-pill.admin {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
}

.btn-logout {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}

.auth-modal-overlay.active {
    display: flex;
}

.auth-modal-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 32px;
    box-shadow: var(--shadow-dropdown);
    position: relative;
    animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-subtle);
    cursor: pointer;
    transition: color 0.15s ease;
}

.auth-modal-close:hover {
    color: var(--text-main);
}

/* PANEL ADMINISTRATORA & AUDYT */
.admin-nav-link {
    color: #a855f7 !important;
    font-weight: 700 !important;
}

.admin-table-container {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.admin-table th {
    background-color: var(--bg-subtle);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.admin-table tr:hover td {
    background-color: var(--primary-subtle);
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.active {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.disabled {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.btn-toggle-status {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.btn-toggle-status.disable-action {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-toggle-status.disable-action:hover {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-toggle-status.enable-action {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.btn-toggle-status.enable-action:hover {
    background-color: #22c55e;
    color: #ffffff;
}

.btn-view-history {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-view-history:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* BLOKADA WYMUSZENIA ZMIANY HASŁA */
.force-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.94);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.force-modal-overlay.active {
    display: flex;
}

.force-modal-box {
    background-color: var(--bg-surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.password-requirements {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.775rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.45;
}

.password-requirements strong {
    color: var(--text-main);
}

/* RWD */
@media (max-width: 990px) {
    .menu-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        padding: 12px;
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.open { display: flex; }
    .dropdown-content { position: static; box-shadow: none; border: none; padding-left: 12px; background-color: transparent; }
    .bottom-grid { grid-template-columns: 1fr; }
    .card { padding: 24px 18px; }
    .cad-input-panel { flex-direction: column; align-items: stretch; }
    .cad-toolbar { flex-direction: column; align-items: stretch; }
}