@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap");

/* === Base / Layout === */
html, body {
    height: 100%;
    margin: 0;
}
body {
    font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    color: #e5fbe5;
    background: #000; /* canvas sits on top anyway */
    overflow: hidden; /* matches your old file */
}

/* Full-screen background canvas */
#c {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 0;            /* behind everything */
    pointer-events: none;  /* allow clicks to pass through */
}

/* Lift login card above canvas */
.login-wrap,
.card {
    position: relative;
    z-index: 1;
}

/* === Card (login container) === */
.card {
    background: rgba(5, 12, 8, 0.75);
    border: 1px solid rgba(0, 255, 128, 0.15);
    border-radius: 14px;
    padding: 20px;
    box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(0, 255, 128, 0.06);
    backdrop-filter: blur(2px);
}

.page-header h1,
.card h1,
.card h2,
.card h3 {
    margin: 0 0 8px;
    font-weight: 600;
    color: #d9ffe1;
    text-shadow: 0 0 10px rgba(0, 255, 128, 0.08);
}

.muted {
    color: #9ad3a8;
    opacity: 0.85;
}

/* === Forms === */
.form {
    display: block;
    width: 100%;
}
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field label {
    font-size: 13px;
    color: #bfffd0;
    letter-spacing: 0.2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input:not([type]),
textarea,
select {
    width: 100%;
    appearance: none;
    padding: 10px 12px;
    font-size: 14px;
    color: #a7ffb7;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 128, 0.18);
    border-radius: 8px;
    outline: none;
    box-shadow:
    inset 0 -5px 45px rgba(0, 80, 40, 0.35),
    0 1px 1px rgba(0, 255, 128, 0.15);
    transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
input:focus,
textarea:focus,
select:focus {
    background: rgba(0, 20, 10, 0.55);
    border-color: rgba(0, 255, 128, 0.35);
    box-shadow:
    inset 0 -5px 45px rgba(0, 120, 60, 0.45),
    0 0 0 3px rgba(0, 255, 128, 0.08);
}

/* Checkbox label row inline with button */
.form-row label input[type="checkbox"] {
    margin-right: 6px;
    accent-color: #1dd45f;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn-primary {
    color: #f6fff9;
    background: linear-gradient(180deg, #1fb760, #0a7f3c 60%, #075f2d);
    border-color: rgba(0, 255, 128, 0.25);
    box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 20px rgba(9, 200, 100, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 28px rgba(9, 200, 100, 0.35);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-gray {
    color: #d8f9e2;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 255, 128, 0.16);
}
.btn-gray:hover {
    background: rgba(255, 255, 255, 0.09);
}

/* Small buttons (pagination / footer links) */
.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 7px;
}

/* === Alerts === */
.alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.35;
    border: 1px solid transparent;
}
.alert.error {
    color: #ffecec;
    background: rgba(255, 0, 64, 0.12);
    border-color: rgba(255, 0, 64, 0.25);
}
.alert.info {
    color: #eafff3;
    background: rgba(0, 255, 128, 0.10);
    border-color: rgba(0, 255, 128, 0.25);
}

/* === Topbar (public header) — optional polish === */
.topbar {
    position: relative;
    z-index: 1;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #c8f7d6;
    background: linear-gradient(180deg, rgba(5, 12, 8, .85), rgba(5, 12, 8, .65));
    border-bottom: 1px solid rgba(0, 255, 128, 0.12);
}
.topbar .logo {
    font-weight: 700;
    letter-spacing: .6px;
    text-shadow: 0 0 8px rgba(0, 255, 128, 0.15);
}

/* === Utility === */
.right { text-align: right; }
.center { text-align: center; }
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }



/* --- Login card: dark translucent, no white bleed, no overflow --- */
.card {
    background: rgba(8, 12, 10, 0.82);     /* darker + translucent */
    border: 1px solid rgba(0, 255, 128, 0.14);
    border-radius: 14px;
    padding: 20px;
    box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(0, 255, 128, 0.05);
    backdrop-filter: blur(2px);
    overflow: hidden;                      /* keep inner elements inside */
}

/* --- Inputs: never overflow; full width but within padding box --- */
.form { width: 100%; }
.form-row { gap: 12px; margin-bottom: 12px; }

.field { min-width: 0; }                 /* allow shrinking within flex */
.field > input,
.field > select,
.field > textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;                /* respect padding/border */
    display: block;
}

/* --- Primary button: remove bottom green line, tighten shadows --- */
.btn-primary {
    color: #f6fff9;
    background: linear-gradient(180deg, #1fb760, #0d6a34 60%, #0b552a);
    border: 1px solid rgba(0, 255, 128, 0.18);
    box-shadow:
    0 6px 18px rgba(9, 200, 100, 0.22); /* removed heavy inset that caused the line */
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(9, 200, 100, 0.30);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(9, 200, 100, 0.25);
}

/* --- Optional: make the login wrap slightly more opaque for readability --- */
.login-wrap.card {
    background: rgba(10, 14, 12, 0.86);
}
