:root {
    /* CouponRelay — mirrors the public design tokens in public/base.html */
    --primary: #0D8F6A;        /* relay-600 */
    --primary-strong: #0A7255; /* relay-700 */
    --primary-soft: #EEFBF6;   /* relay-50  */
    --text: #141322;           /* ink       */
    --muted: #8B8799;          /* faint     */
    --border: #E9E3D9;         /* line      */
    --paper: #FAF8F4;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    /* Deep relay-green field with soft radial depth, plus a faint tiled motif of
       ticket/coupon shapes (dashed ticket, perforation notches, "%" badge) so the
       flat field doesn't read empty. Kept at very low opacity — texture, not noise. */
    background: #0A4A3A;
    background-image:
        radial-gradient(62% 58% at 18% 22%, rgba(20, 172, 126, .55), transparent 68%),
        radial-gradient(52% 55% at 86% 82%, rgba(13, 143, 106, .55), transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff'%3E%3Cg transform='rotate(-10 60 60)' stroke-opacity='.10' stroke-width='2'%3E%3Crect x='24' y='42' width='72' height='36' rx='8'/%3E%3Cline x1='60' y1='42' x2='60' y2='78' stroke-dasharray='3 5'/%3E%3Ccircle cx='24' cy='60' r='5' fill='%230A4A3A'/%3E%3Ccircle cx='96' cy='60' r='5' fill='%230A4A3A'/%3E%3C/g%3E%3Cg transform='rotate(12 184 172)' stroke-opacity='.09' stroke-width='2'%3E%3Ccircle cx='184' cy='172' r='22'/%3E%3Ctext x='184' y='178' font-family='Arial,sans-serif' font-size='18' font-weight='700' text-anchor='middle' fill='%23ffffff' fill-opacity='.09' stroke='none'%3E%25%3C/text%3E%3C/g%3E%3Ccircle cx='206' cy='38' r='13' stroke-opacity='.08' stroke-width='2' stroke-dasharray='2 5'/%3E%3Cg transform='rotate(8 42 196)' stroke-opacity='.08' stroke-width='2'%3E%3Crect x='16' y='182' width='52' height='28' rx='7'/%3E%3Cline x1='42' y1='182' x2='42' y2='210' stroke-dasharray='2 4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: auto, auto, 240px 240px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    box-shadow: 0 20px 50px -20px rgba(4, 42, 33, 0.45),
    0 8px 20px -10px rgba(4, 42, 33, 0.25);
}

.brand {
    text-align: center;
    margin-bottom: 26px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 20px -8px rgba(13, 143, 106, 0.55);
}

.brand-logo svg {
    width: 28px;
    height: 28px;
}

.brand-title {
    margin: 0;
    font-family: 'Sora', system-ui, -apple-system, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.field-link {
    align-self: flex-end;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.field-link:hover {
    text-decoration: underline;
}

.field-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.field-input:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 172, 126, 0.20);
}

.field-icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
    flex-shrink: 0;
}

.field-input input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
}

.field-input input::placeholder {
    color: #B4B0BF;
}

.toggle-pwd {
    border: 0;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    color: var(--muted);
    display: flex;
}

.toggle-pwd:hover {
    color: var(--primary);
}

.toggle-pwd svg {
    width: 18px;
    height: 18px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    margin-top: 2px;
}

.remember input {
    accent-color: var(--primary);
}

.form-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
}

.submit-btn {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 16px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(13, 143, 106, 0.6);
    transition: transform .1s, box-shadow .15s, opacity .15s, background .15s;
}

.submit-btn svg {
    width: 16px;
    height: 16px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--primary-strong);
    box-shadow: 0 14px 24px -10px rgba(13, 143, 106, 0.75);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.foot {
    margin: 10px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.foot a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.foot a:hover {
    text-decoration: underline;
}
