*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --t2-pink: #ff2d87;
    --t2-pink-dark: #e0186f;
    --t2-pink-soft: rgba(255, 45, 135, 0.12);
    --t2-black: #111111;
    --t2-bg: #f4f4f5;
    --t2-text: #111111;
    --t2-muted: #6b6b70;
    --t2-border: #e6e6ea;
    --t2-white: #ffffff;
}

body {
    font-family: "Onest", "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255, 45, 135, 0.08), transparent 55%),
        var(--t2-bg);
    color: var(--t2-text);
    text-align: center;
    padding: 16px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 420px;
    margin: 0 auto;
}

.screen {
    background: var(--t2-white);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    padding: 28px 20px 24px;
    border: 1px solid var(--t2-border);
}

.brand-header {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.logo {
    width: 56px;
    height: 56px;
    display: block;
    object-fit: contain;
}

h1 {
    font-size: 26px;
    margin-bottom: 8px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 15px;
    color: var(--t2-muted);
    margin-bottom: 20px;
}

.card {
    background: #fafafa;
    border: 1px solid var(--t2-border);
    border-radius: 16px;
    padding: 22px 18px;
    margin: 18px 0;
}

.code-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.code-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 20px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.12em;
    border: 1.5px solid #d8d8de;
    background: var(--t2-white);
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    color: var(--t2-black);
}

.code-input:focus {
    border-color: var(--t2-pink);
    box-shadow: 0 0 0 3px var(--t2-pink-soft);
}

.btn-t2 {
    display: inline-block;
    background: var(--t2-black);
    color: var(--t2-white) !important;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 24px;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
}

.btn-t2:hover {
    background: #000;
}

.btn-t2:active {
    transform: scale(0.98);
}

.btn-t2--secondary {
    background: #f0f0f2;
    color: var(--t2-text) !important;
}

.btn-t2--secondary:hover {
    background: #e4e4e8;
}

.card--success {
    background: #f3fbf6;
    border-color: rgba(36, 138, 61, 0.2);
}

.success-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, #34c759 0%, #248a3d 100%);
    box-shadow: 0 6px 20px rgba(36, 138, 61, 0.3);
}

.error {
    color: var(--t2-pink);
    font-size: 13px;
    font-weight: 600;
}

.small {
    color: var(--t2-muted);
    font-size: 14px;
    margin-top: 8px;
}

.big-text {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0 6px;
}

.waiting-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: var(--t2-pink);
    box-shadow: 0 0 0 8px var(--t2-pink-soft);
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.75; }
}

.page-label {
    color: var(--t2-muted);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

.codes-list {
    list-style: none;
    margin-top: 16px;
    text-align: left;
}

.code-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    background: #fafafa;
    border: 1px solid var(--t2-border);
    border-radius: 14px;
    padding: 14px 12px;
    margin-bottom: 10px;
}

.code-row--pending {
    border-left: 3px solid var(--t2-pink);
}

.code-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.code-field-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--t2-muted);
    font-weight: 600;
}

.code-value {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.code-time {
    font-size: 11px;
    color: var(--t2-muted);
}

.code-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.btn-small {
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.btn-approve {
    background: #248a3d;
    color: #fff;
}

.btn-reject {
    background: #f0f0f2;
    color: var(--t2-text);
    border: 1px solid var(--t2-border);
}

.status-ok { color: #248a3d; font-size: 12px; font-weight: 700; }
.status-bad { color: var(--t2-pink); font-size: 12px; font-weight: 700; }

.empty-state {
    color: var(--t2-muted);
}

@media (max-width: 420px) {
    h1 { font-size: 22px; }
    .code-row { flex-direction: column; }
    .code-actions { flex-direction: row; justify-content: flex-end; }
}
