@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@400;500;600;700&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────────────── */
:root {
    --primary:       #15803d;
    --primary-hover: #166534;
    --secondary:     #0ea5e9;
    --accent:        #991b1b;
    --bg-dark:       #0a0f1e;
    --bg-card:       rgba(17, 24, 39, 0.85);
    --text-main:     #f1f5f9;
    --text-muted:    #94a3b8;
    --text-dim:      #64748b;
    --border-light:  rgba(255, 255, 255, 0.08);
    --border-focus:  rgba(99, 102, 241, 0.6);
    --glass-shadow:  0 25px 60px rgba(0, 0, 0, 0.55);
    --radius:        16px;
    --radius-sm:     11px;
    --radius-xs:     8px;
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Body ──────────────────────────────────────────────────────────── */
html {
    min-height: 100vh;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: #080d1a;
    background-image:
        radial-gradient(ellipse 80% 50% at 15% -5%, rgba(79, 70, 229, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 85% 100%, rgba(14, 165, 233, 0.18) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
}

/* ─── Form Card ──────────────────────────────────────────────────────── */
.container,
.form-container,
.main-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: hidden;
}

/* Accent glow line at top */
.container::before,
.form-container::before,
.main-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.7), rgba(14, 165, 233, 0.5), transparent);
    pointer-events: none;
}

/* ─── Form Header ─────────────────────────────────────────────────────── */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

/* ─── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    text-align: center;
    background: linear-gradient(135deg, #a5b4fc, #60a5fa, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }

/* ─── Form Layout ────────────────────────────────────────────────────── */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

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

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    display: block;
}

/* ─── Inputs & Selects ───────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: rgba(255, 255, 255, 0.07);
}

input::placeholder {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Date / time color fix */
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

/* Select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

select option {
    background: #1e293b;
    color: var(--text-main);
}

/* ─── Primary Button ─────────────────────────────────────────────────── */
input[type="submit"],
button.btn-primary,
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.22s ease,
        filter 0.2s ease;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.4);
    margin-top: 6px;
    width: 100%;
    display: block;
    text-align: center;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

input[type="submit"]:hover,
button.btn-primary:hover,
.btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.55);
    filter: brightness(1.08);
}

input[type="submit"]:active,
button.btn-primary:active,
.btn-primary:active {
    transform: translateY(0) scale(0.99);
}

/* ─── Danger Button ──────────────────────────────────────────────────── */
button.btn-danger,
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #f43f5e);
    color: white;
    border: none;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.22s ease,
        filter 0.2s ease;
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.4);
    margin-top: 6px;
    width: 100%;
    display: block;
    text-align: center;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

button.btn-danger:hover,
.btn-danger:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 28px rgba(220, 38, 38, 0.55);
    filter: brightness(1.08);
}

/* ─── Links ──────────────────────────────────────────────────────────── */
a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: #a5b4fc;
}

.link,
.go-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding: 11px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 500;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.link:hover,
.go-back-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: translateY(-1px);
}

/* ─── Password Toggle ────────────────────────────────────────────────── */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    margin: 0;
    box-shadow: none;
    text-transform: uppercase;
    width: auto;
    display: inline-block;
    transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    transform: translateY(-50%);
    box-shadow: none;
    filter: none;
}

/* ─── Tables ─────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    font-size: 0.9rem;
}

th {
    background: rgba(0, 0, 0, 0.25);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    color: var(--text-dim);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ─── Background Orbs ───────────────────────────────────────────────── */
.orb-1, .orb-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}

.orb-1 {
    top: -120px;
    left: -120px;
    width: 450px;
    height: 450px;
    background: rgba(79, 70, 229, 0.28);
}

.orb-2 {
    bottom: -120px;
    right: -120px;
    width: 350px;
    height: 350px;
    background: rgba(14, 165, 233, 0.22);
}

/* ─── Animations ─────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 500px) {
    body {
        padding: 16px 14px;
        align-items: flex-start;
    }

    .container,
    .form-container,
    .main-wrapper {
        padding: 30px 20px;
        border-radius: 14px;
    }

    h2 {
        font-size: 1.5rem;
    }
}
