
:root {
    --navy: #172b40;
    --accent: #2878b5;
    --background: #f3f5f8;
    --text: #243447;
    --border: #dce2e8;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
}

#login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--navy);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 36px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px #0003;
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 26px;
}

.login-card p {
    color: #64748b;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font: inherit;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.1);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#login-form button {
    width: 100%;
    margin-top: 24px;
}

#app {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: 250px;
    flex-shrink: 0;
    padding: 24px 16px;
    background: var(--navy);
    color: white;
    display: flex;
    flex-direction: column;
}

#sidebar h2 {
    margin: 0;
    font-size: 32px;
    letter-spacing: 3px;
}

#sidebar p {
    color: #b6c7d8;
    font-size: 13px;
    margin-bottom: 30px;
}

#sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#sidebar nav button {
    text-align: left;
    background: transparent;
    color: #e2e8f0;
    padding: 12px;
}

#sidebar nav button:hover,
#sidebar nav button.active {
    background: #ffffff20;
    color: white;
}

#logout-button {
    margin-top: auto;
    background: #ffffff18;
}

#main-content {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

header h1 {
    margin: 0;
    font-size: 28px;
}

#user-info {
    color: #64748b;
    font-size: 13px;
}

#page-content {
    overflow-x: auto;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #e8edf3;
    font-weight: 600;
}

tr:hover td {
    background: #f7f9fc;
}

a {
    color: var(--accent);
}

#status-message, #login-message {
    margin: 12px 0;
}

.error {
    color: #b42318;
}

.success {
    color: #16803c;
}

@media (max-width: 760px) {
    #app {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
    }

    #sidebar nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    #logout-button {
        margin-top: 20px;
    }

    #main-content {
        padding: 16px;
    }

    header h1 {
        font-size: 22px;
    }
}
