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

:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 80px;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.header h1 { font-size: 20px; }
.header .session-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
}
.session-badge.valid { background: #166534; color: #86efac; }
.session-badge.invalid { background: #7f1d1d; color: #fca5a5; }

/* Sections */
.section { margin-bottom: 24px; }
.section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Form */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.form-group select,
.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    -webkit-appearance: none;
}
.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 6px 12px; font-size: 13px; width: auto; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
}
.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--text-muted); }
.card-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}
.card-delete:hover { color: var(--danger); }

/* Status badges */
.status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.status-pending { background: #1e3a5f; color: #93c5fd; }
.status-scheduled { background: #1e3a5f; color: #93c5fd; }
.status-attempting { background: #713f12; color: #fde047; }
.status-success { background: #166534; color: #86efac; }
.status-failed { background: #7f1d1d; color: #fca5a5; }

/* Modal / Session panel */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
}
.modal-backdrop.active { display: flex; align-items: flex-end; }
.modal {
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    padding: 20px 16px 32px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal h3 { margin-bottom: 14px; }
.modal textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 10px;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s;
}
.toast.show { opacity: 1; }
