:root {
    --bg: #1a1a2e;
    --surface: #16213e;
    --border: #0f3460;
    --accent: #e94560;
    --text: #eee;
    --text-secondary: #aaa;
    --radius: 12px;
}

* { 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);
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 { font-size: 24px; font-weight: 700; }

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab {
    flex: 1;
    min-width: fit-content;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

h2 { font-size: 18px; margin-bottom: 12px; }

p { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.form-group .desc {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

textarea, input[type="text"], input[type="password"], input[type="time"], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}

.btn.primary { background: var(--accent); color: white; }
.btn.secondary { background: var(--border); color: var(--text); }

.rule-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rule-form input { flex: 1 1 100px; }
.rule-form select { flex: 1 1 120px; }
.rule-form .btn { flex: 0 0 auto; width: auto; }

.rules-list { list-style: none; }

.rules-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 6px;
    font-size: 14px;
}

.rules-list .remove {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 18px;
}

.preview {
    margin-top: 16px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius);
}

.preview-box {
    margin-top: 8px;
    padding: 10px;
    background: var(--bg);
    border-radius: 8px;
    font-style: italic;
    font-size: 14px;
}

.hidden { display: none; }

input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--accent);
}
