/* The customers' pages: sign up, log in, dashboard, profile. */

* { box-sizing: border-box; }
body {
    font-family: system-ui, sans-serif;
    background: #f4f5f7;
    margin: 0;
    color: #1f2430;
    line-height: 1.45;
}
a { color: #2f6fed; }
h1 { font-size: 26px; }
h2 { font-size: 18px; margin: 0 0 12px; }

/* Sign up and log in */
.auth-box {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.auth-box h1 { margin-top: 0; font-size: 22px; }
.auth-box p { font-size: 14px; }
.auth-box a { text-decoration: none; }
.auth-box a:hover { text-decoration: underline; }
.brand {
    display: block;
    margin: 0 0 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2f6fed;
}

/* Forms */
form label {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
}
form input,
form textarea {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    background: #fff;
}
form textarea { resize: vertical; min-height: 62px; }
form input[hidden] { display: none; }
form input[readonly] { background: #f3f4f6; color: #6b7280; }
form input:focus,
form textarea:focus {
    outline: none;
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47,111,237,0.15);
}
.trap { position: absolute; left: -9999px; }
.hint { color: #6b7280; font-size: 13px; }

button,
.button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #2f6fed;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
button:hover,
.button:hover { background: #2559c9; }
button:focus-visible,
.button:focus-visible,
a:focus-visible { outline: 2px solid #1f2430; outline-offset: 2px; }

/* A button that reads as a link (log out, download, invoice). */
button.link {
    display: inline;
    width: auto;
    padding: 0;
    background: none;
    color: #2f6fed;
    font-size: inherit;
}
button.link:hover { background: none; text-decoration: underline; }
form.inline { display: inline; margin: 0; }

.error { color: #c62828; font-size: 14px; }
.success { color: #2e7d32; font-size: 14px; }

/* Dashboard and profile */
.dashboard {
    max-width: 640px;
    margin: 60px auto;
    padding: 0 16px;
}
.dashboard header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.dashboard header h1 { margin: 0; }
.logout-link { color: #2f6fed; text-decoration: none; }
.dashboard header div { display: flex; gap: 16px; align-items: center; }
.dashboard header a,
.dashboard header button.link { color: #2f6fed; text-decoration: none; font-size: 16px; }
.dashboard header a:hover { text-decoration: underline; }
.card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.card + .card { margin-top: 16px; }
.card > p { font-size: 14px; }
.card form + p { margin-bottom: 0; }
.card h2 + h2,
.card label + h2 { margin-top: 28px; }
.license-row, .transaction-row, .product-row {
    padding: 12px 0;
    border-top: 1px solid #eee;
}
.license-row:first-of-type, .transaction-row:first-of-type, .product-row:first-of-type {
    border-top: none;
}
.license-row p, .transaction-row p, .product-row p {
    margin: 4px 0;
    font-size: 14px;
}
.action { margin: 4px 0; font-size: 14px; }
.product-row .button { margin-top: 10px; }
.key {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    background: #f4f5f7;
    padding: 2px 6px;
    border-radius: 4px;
    user-select: all;
}
.on { color: #2e7d32; }
.off { color: #c62828; }
.note {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Local test mode (a development site only): the strip on top, the test inbox. */
.test-bar {
    padding: 8px 16px;
    background: #fff8e1;
    border-bottom: 1px solid #f0d98c;
    color: #5c4a00;
    font-size: 13px;
    text-align: center;
}
.test-bar a { color: #5c4a00; font-weight: 700; }
.mail-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.mail-clear { margin: 16px 0; font-size: 14px; }

@media (max-width: 480px) {
    .auth-box { margin: 24px 16px; padding: 24px; }
    .dashboard { margin: 24px auto; }
    .dashboard header { flex-direction: column; align-items: flex-start; }
}
