/* =========================
   VARIABLES
========================= */
:root {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-titillium: "Titillium Web", sans-serif;

    --text-color-darkgrey: oklch(21% .034 264.665);
    --text-color-grey: oklch(55.1% .027 264.364);

    --color-background: oklch(1 0 0);
    --color-background-2: #1E2939;
    --color-highlight: oklch(.67 .1817 138.9);
    --color-highlight-red: #FF0000;

    --radius: 0.625rem; /* consistent with previous form-card */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease-in-out;
}

/* =========================
   GLOBAL STYLES
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--color-background);
    color: var(--text-color-darkgrey);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: auto;
}

h1, h2 {
    margin-bottom: 1rem;
    color: var(--color-highlight);
}

/* =========================
   FORM STYLES
========================= */
.auth-container {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

fieldset {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: var(--color-highlight);
}

label {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-color-darkgrey);
}

input,
select,
textarea,
button {
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
    font-size: 1rem;
    margin-top: 0.3rem;
    transition: var(--transition);
    background: white;
    color: var(--text-color-darkgrey);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.15);
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
}

/* Buttons */
button,
.btn-submit {
    background: var(--color-highlight);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

button:hover,
.btn-submit:hover {
    background: oklch(.8 .2 138.9);
}

/* =========================
   AUTH (LOGIN / REGISTER)
========================= */
.auth-container {
    max-width: 400px;
    margin: auto;
    text-align: center;
}

.auth-container input {
    width: 100%;
    margin-bottom: 1rem;
}

.auth-container button {
    width: 100%;
}

.auth-container a {
    color: var(--color-highlight);
    text-decoration: none;
    font-weight: 500;
}

.auth-container a:hover {
    text-decoration: underline;
}

.error {
    margin-top: 1rem;
    color: var(--color-highlight-red);
    font-size: 0.9rem;
}

/* =========================
   SIGNATURE CANVAS
========================= */
#signature-pad {
    width: 100%;
    max-width: 700px;
    height: 250px;
    border-radius: var(--radius);
    background: white;
    margin-top: 0.5rem;
    border: 1px solid #e5e7eb;
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 1rem;
    background: var(--color-background-2);
    color: white;
    margin-top: auto;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (min-width: 600px) {
    form,
    .auth-container {
        padding: 2.5rem;
    }

    fieldset {
        padding: 2rem;
    }
}

@media (min-width: 900px) {
    form,
    .auth-container {
        padding: 3rem;
    }

    label {
        font-size: 1rem;
    }
}