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

:root {
    --bg-primary: #0f1115;
    --bg-secondary: #161922;
    --bg-tertiary: #1c2030;
    --bg-elevated: #232838;
    --bg-hover: #2a3042;
    --bg-active: #31384d;
    
    --border-color: #2a2f42;
    --border-strong: #3a4158;
    
    --text-primary: #e8ecf5;
    --text-secondary: #a0a8bf;
    --text-tertiary: #6b7386;
    --text-muted: #4a5066;
    
    --accent: #5b8def;
    --accent-hover: #73a2ff;
    --accent-active: #4a7de0;
    --accent-soft: rgba(91, 141, 239, 0.15);
    --accent-glow: rgba(91, 141, 239, 0.3);
    
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    
    --sidebar-w: 320px;
    --topbar-h: 56px;
    --statusbar-h: 32px;
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

.app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ====== Topbar ====== */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    z-index: 10;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.tagline {
    font-size: 12px;
    color: var(--text-tertiary);
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ====== Buttons ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

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

.btn:active {
    background: var(--bg-active);
}

.btn .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}

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

.btn-primary:active {
    background: var(--accent-active);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    height: 40px;
    font-size: 13px;
    padding: 0 16px;
    gap: 8px;
}

/* ====== Main Layout ====== */
.main {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* ====== Sidebar ====== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.panel {
    border-bottom: 1px solid var(--border-color);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.panel-header:hover {
    background: rgba(255,255,255,0.02);
}

.panel-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.panel-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    flex: 1;
}

.panel-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.panel.collapsed .panel-chevron {
    transform: rotate(-90deg);
}

.panel.collapsed .panel-body {
    display: none;
}

.panel-body {
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-export .panel-body {
    gap: 12px;
}

/* ====== Form Elements ====== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.flex-1 {
    flex: 1;
}

label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.value-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 8px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: center;
}

textarea, .select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    resize: vertical;
    min-height: 40px;
}

textarea:focus, .select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

textarea {
    line-height: 1.5;
    min-height: 72px;
}

.select {
    height: 36px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a0a8bf'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 28px;
}

.hint {
    font-size: 10.5px;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: 2px;
}

/* Switch 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-color);
    transition: 0.2s;
    border-radius: 20px;
}

.slider-switch::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.switch input:checked + .slider-switch {
    background: var(--accent-color);
}

.switch input:checked + .slider-switch::before {
    transform: translateX(16px);
}

/* 禁用态 */
.form-group.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* 3D打印建议 */
.print-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.tip-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    margin-top: 0.5px;
}

.tip-icon svg {
    display: block;
}

.tip-item:nth-child(1) .tip-icon,
.tip-item:nth-child(2) .tip-icon {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.tip-item:nth-child(3) .tip-icon,
.tip-item:nth-child(4) .tip-icon,
.tip-item:nth-child(5) .tip-icon,
.tip-item:nth-child(6) .tip-icon,
.tip-item:nth-child(8) .tip-icon {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.tip-item:nth-child(7) .tip-icon {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.tip-item.print-time-estimate .tip-icon {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.font-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(244, 140, 40, 0.12);
    border: 1px solid rgba(244, 140, 40, 0.3);
    border-radius: 6px;
    font-size: 11px;
    color: #f5a623;
    margin-bottom: 8px;
    line-height: 1.4;
}

.font-warning .warn-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #f5a623;
}

.font-warning.show-error {
    background: rgba(229, 76, 76, 0.12);
    border-color: rgba(229, 76, 76, 0.4);
    color: #ff8a8a;
}

.font-warning.show-error .warn-icon {
    color: #ff8a8a;
}

.sub-group-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: -4px;
}

/* ====== Slider ====== */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    position: relative;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid var(--bg-secondary);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ====== Segmented Control ====== */
.segmented {
    display: flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px;
    gap: 2px;
}

.seg-btn {
    flex: 1;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.seg-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.seg-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 3px var(--accent-glow);
}

/* ====== Divider ====== */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ====== Color Picker Row ====== */
.color-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-dot {
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    position: relative;
}

.color-dot:hover {
    transform: scale(1.1);
}

.color-dot.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--accent-soft);
}

/* ====== Checkbox ====== */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    background: var(--bg-primary);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-row label {
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ====== Export Info ====== */
.export-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
}

.info-label {
    color: var(--text-tertiary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ====== Viewport ====== */
.viewport {
    flex: 1;
    position: relative;
    background: radial-gradient(ellipse at center, #1a1f2e 0%, #0a0c12 100%);
    min-width: 0;
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.viewport-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(15, 17, 21, 0.85);
    color: var(--text-secondary);
    font-size: 13px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-tip {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: -4px;
    opacity: 0.8;
}

.loading-overlay.hidden {
    display: none;
}

/* ====== View Controls ====== */
.view-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    background: rgba(22, 25, 34, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    z-index: 5;
}

.view-btn {
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.view-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.view-btn.active {
    background: var(--accent);
    color: #fff;
}

/* ====== Dimensions Badge ====== */
.dimensions-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(22, 25, 34, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5;
    min-width: 140px;
}

.dim-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.dim-label {
    color: var(--text-tertiary);
    width: 18px;
    font-weight: 500;
}

.dim-val {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex: 1;
    text-align: right;
}

.dim-unit {
    color: var(--text-tertiary);
    font-size: 10px;
}

/* ====== Statusbar ====== */
.statusbar {
    height: var(--statusbar-h);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-tertiary);
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot-ok {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.status-sep {
    color: var(--border-strong);
}

/* ====== Modal ====== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.2s ease;
}

.modal-sm {
    width: 360px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ====== Preset Grid ====== */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.preset-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.preset-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.preset-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    color: var(--accent);
}

.preset-icon svg {
    width: 100%;
    height: 100%;
}

.preset-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.preset-desc {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ====== Progress ====== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* ====== Password Overlay ====== */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(15, 17, 21, 0.95) 0%, rgba(15, 17, 21, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.3s ease;
}

.password-overlay.hidden {
    display: none;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.password-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-icon svg {
    width: 28px;
    height: 28px;
}

.password-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.password-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.password-input-wrap {
    margin-bottom: 16px;
}

.password-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    letter-spacing: 4px;
}

.password-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.password-input::placeholder {
    color: var(--text-muted);
    letter-spacing: normal;
}

.password-error {
    color: var(--danger);
    font-size: 12px;
    margin-bottom: 16px;
    height: 18px;
    line-height: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}

.password-error.visible {
    opacity: 1;
}

.password-btn {
    width: 100%;
    height: 44px;
    background: linear-gradient(180deg, var(--accent), var(--accent-active));
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.password-btn:hover {
    box-shadow: 0 4px 12px var(--accent-glow);
}

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

.password-hint {
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
}

.status-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.status-link:hover {
    color: var(--text-primary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
