/* style.css — Giao diện trang kích hoạt mã. Tối giản, rõ ràng, responsive. */

:root {
    --bg: #f4f6fb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #e5e7eb;
    --success: #16a34a;
    --warning: #d97706;
    --error: #dc2626;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 24px 16px;
}

.container {
    max-width: 560px;
    margin: 0 auto;
}

.app-header {
    text-align: center;
    margin-bottom: 24px;
}

.app-header h1 {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.subtitle {
    color: var(--muted);
    margin: 0;
    font-size: .95rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: .92rem;
}

.input-row {
    display: flex;
    gap: 10px;
}

input[type="text"],
input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, opacity .15s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.hint {
    color: var(--muted);
    font-size: .82rem;
    margin: 8px 0 0;
}

.hidden { display: none; }

/* ----- Kết quả ----- */
.detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: var(--muted);
    font-size: .9rem;
    flex-shrink: 0;
}

.info-value {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    color: #fff;
}

.status-1 { background: var(--primary); }
.status-2 { background: var(--warning); }
.status-3 { background: var(--success); }
.status-expired { background: var(--error); }

/* ----- Form email ----- */
.email-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

/* ----- Ghi chú / thông báo ----- */
.note {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: .92rem;
}

.note-pending { background: #fef3c7; color: #92400e; }
.note-approved,
.note-success { background: #dcfce7; color: #166534; }
.note-error { background: #fee2e2; color: #991b1b; }

.message { margin: 0; font-size: .95rem; }
.result.error .message { color: var(--error); }
.result.info .message { color: var(--muted); }

@media (max-width: 480px) {
    .input-row { flex-direction: column; }
    .btn { width: 100%; }
}
