/* ── DWG to PDF Converter — Styles ─────────────────────── */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Header ── */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ── Container ── */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.tab-btn:hover:not(.active) {
    background: rgba(0,0,0,0.02);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ── Card ── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* ── Drop Zone ── */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.drop-zone-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.drop-zone-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.drop-zone input[type="file"] {
    display: none;
}

/* ── File Info ── */
.file-info {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(37, 99, 235, 0.06);
    border-radius: 8px;
    margin-top: 1rem;
}

.file-info.show {
    display: flex;
}

.file-info .file-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info .file-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
}

/* ── Options ── */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.checkbox-group label {
    font-size: 0.9rem;
    cursor: pointer;
}

/* ── Button ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.25rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
}

/* ── Progress ── */
.progress-wrapper {
    display: none;
    margin-top: 1.25rem;
}

.progress-wrapper.show {
    display: block;
}

.progress-bar-bg {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}

/* ── Result ── */
.result {
    display: none;
    text-align: center;
    padding: 1.5rem;
}

.result.show {
    display: block;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.result-message {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-message.error {
    color: var(--danger);
}

.result-message.success {
    color: var(--success);
}

/* ── Certificate Info ── */
.cert-info {
    display: none;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.cert-info.show {
    display: block;
}

.cert-info dt {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.cert-info dt:first-child {
    margin-top: 0;
}

.cert-info dd {
    color: var(--text);
    margin-bottom: 0.25rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 0.75rem;
    }
}
