:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #cbd5e1;
    --text: #1f2937;
    --muted: #4b5563;
    --primary: #1e3a8a;
    --secondary: #2563eb;
    --shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    width: min(100%, 380px);
    text-align: center;
}

.login-card h1 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-field {
    width: 100%;
    padding: 0.95rem 1rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
}

.btn {
    padding: 0.95rem 1rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    width: 100%;
}

.btn-login {
    background-color: var(--secondary);
    color: white;
}

.form-card button,
button.button,
button[type="submit"] {
    margin-top: 1rem;
    width: 100%;
}

img,
svg {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

header {
    background: var(--primary);
    color: white;
    padding: 1rem 1.25rem;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.username {
    font-size: 0.95rem;
    color: #e2e8f0;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.1rem;
    background: var(--secondary);
    color: white;
    border-radius: 9999px;
    border: none;
    transition: background 0.2s ease;
}

.logout-button:hover {
    background: #1d4ed8;
}

main {
    flex: 1;
}

.page-wrapper {
    width: min(1100px, calc(100% - 2rem));
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.panel {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.panel-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.panel-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.form-card {
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.form-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary);
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

.form-grid-two {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.95rem;
    color: var(--muted);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 0.95rem 1rem;
    background: white;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button.button,
button[type="submit"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 3rem;
    padding: 0.85rem 1.3rem;
    border: none;
    border-radius: 9999px;
    background: var(--secondary);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.button-secondary {
    background: #e5e7eb;
    color: var(--text);
}

footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 1rem 1.25rem;
}

@media (min-width: 720px) {
    .form-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .header-nav {
        align-items: flex-start;
    }

    .page-wrapper {
        padding: 1.5rem 0 2.5rem;
    }
}
