/* SetupTutorial Tools CSS — uses theme tokens from style.css */

.st-tool-wrap {
    max-width: 760px;
    margin: 30px auto;
    padding: 28px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-md);
    color: var(--st-text);
    font-family: var(--st-font-sans);
    line-height: 1.55;
}
.st-tool-wrap *, .st-tool-wrap *::before, .st-tool-wrap *::after { box-sizing: border-box; }

.st-tool-wrap h2 { font-size: 1.55rem; margin: 0 0 6px; font-weight: 700; }
.st-tool-wrap .st-tool-sub { color: var(--st-text-muted); margin: 0 0 22px; font-size: .95rem; }

.st-tool-wrap label {
    display: block;
    font-weight: 600;
    font-size: .92rem;
    margin: 14px 0 6px;
    color: var(--st-text);
}

.st-tool-wrap input[type="text"],
.st-tool-wrap input[type="number"],
.st-tool-wrap input[type="date"],
.st-tool-wrap input[type="password"],
.st-tool-wrap select,
.st-tool-wrap textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 16px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: var(--st-bg-soft);
    color: var(--st-text);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    font-family: inherit;
}
.st-tool-wrap input:focus, .st-tool-wrap select:focus, .st-tool-wrap textarea:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px var(--st-primary-soft);
}
.st-tool-wrap textarea { min-height: 180px; resize: vertical; }
.st-tool-wrap input[type="range"] { width: 100%; accent-color: var(--st-primary); }

/* Buttons */
.st-btn-tool {
    display: inline-flex;
    align-items: center; justify-content: center; gap: 6px;
    padding: 12px 22px;
    font-size: 1rem; font-weight: 600;
    background: var(--st-primary);
    color: #fff; border: none;
    border-radius: var(--st-radius-sm);
    cursor: pointer;
    transition: background .15s, transform .05s;
    font-family: inherit; min-height: 44px;
}
.st-btn-tool:hover { background: var(--st-primary-hover); }
.st-btn-tool:active { transform: translateY(1px); }
.st-btn-tool:disabled { opacity: .65; cursor: not-allowed; }
.st-btn-tool-secondary {
    background: var(--st-surface-2); color: var(--st-text);
    border: 1px solid var(--st-border);
}
.st-btn-tool-secondary:hover { background: var(--st-surface); border-color: var(--st-primary); }

.st-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.st-col { flex: 1 1 180px; min-width: 0; }

.st-checkbox-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin: 6px 0 14px; }
.st-checkbox-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; cursor: pointer; }

.st-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--st-border); margin-bottom: 18px; flex-wrap: wrap; }
.st-tab {
    padding: 10px 16px;
    background: transparent; border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer; font-weight: 600;
    color: var(--st-text-muted); font-size: .94rem; font-family: inherit;
}
.st-tab.active { color: var(--st-primary); border-bottom-color: var(--st-primary); }

.st-result {
    margin-top: 20px; padding: 18px;
    background: var(--st-bg-soft);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
}
.st-result-title {
    font-size: .82rem; font-weight: 700;
    color: var(--st-text-muted);
    text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 8px;
}
.st-result-value {
    font-size: 1.8rem; font-weight: 700;
    color: var(--st-primary);
    word-break: break-word;
}

.st-stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px; margin-top: 18px;
}
.st-stat {
    padding: 14px;
    background: var(--st-bg-soft);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    text-align: center;
}
.st-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--st-primary); display: block; line-height: 1.2; }
.st-stat-label { font-size: .78rem; color: var(--st-text-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

/* Password display */
.st-pw-display {
    font-family: var(--st-font-mono);
    font-size: 1.1rem; letter-spacing: 1px;
    padding: 14px 16px;
    background: var(--st-bg-soft);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    word-break: break-all;
    margin-bottom: 10px;
    min-height: 52px;
    color: var(--st-accent);
}
.st-strength-bar {
    height: 6px; border-radius: 3px;
    background: var(--st-border);
    overflow: hidden; margin: 8px 0 4px;
}
.st-strength-fill { height: 100%; width: 0; background: var(--st-danger); transition: width .25s, background .25s; }
.st-strength-label { font-size: .85rem; font-weight: 600; color: var(--st-text-muted); }

.st-badge {
    display: inline-block; padding: 4px 12px;
    border-radius: 20px;
    font-size: .82rem; font-weight: 600;
    background: var(--st-primary); color: #fff;
    margin-left: 8px;
}
.st-badge.st-ok     { background: var(--st-success); }
.st-badge.st-warn   { background: var(--st-warning); color: #000; }
.st-badge.st-danger { background: var(--st-danger); }

#st-qr-canvas {
    margin-top: 18px; display: flex; justify-content: center;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    min-height: 200px; align-items: center;
}
#st-qr-canvas img, #st-qr-canvas canvas { display: block; max-width: 100%; height: auto; }

/* Spinner */
.st-spinner {
    display: inline-block;
    width: 22px; height: 22px;
    border: 3px solid var(--st-border);
    border-top-color: var(--st-primary);
    border-radius: 50%;
    animation: st-spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

.st-muted { color: var(--st-text-muted); font-size: .88rem; }
.st-hidden { display: none !important; }

@media (max-width: 600px) {
    .st-tool-wrap { margin: 16px 12px; padding: 20px 16px; border-radius: var(--st-radius); }
    .st-tool-wrap h2 { font-size: 1.3rem; }
    .st-result-value { font-size: 1.4rem; }
    .st-checkbox-group { grid-template-columns: 1fr; }
    .st-btn-tool { width: 100%; }
    .st-row .st-btn-tool { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .st-spinner { animation: none; }
}
