:root {
    --nav-height: 84px;
    --z-base: 0;
    --z-dropdown: 200;
    --z-sticky: 400;
    --z-backdrop: 500;
    --z-drawer: 600;
    --z-modal: 700;
    --z-modal-content: 710;
    --z-toast: 800;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f2f5;
}

.main-nav {
    background: #2c3e50;
    color: #ffffff;
    padding: 1.35rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    min-height: var(--nav-height);
    width: 100%;
    box-sizing: border-box;
    
}

.nav-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.nav-title a {
    display: inline-block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
    color: inherit;
}

.nav-toggle-line {
    width: 1.75rem;
    height: 3px;
    background-color: currentColor;
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links.open {
    display: flex;
}

.nav-links:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 4px;
    border-radius: 8px;
}

.main-nav:focus-within .nav-toggle {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 4px;
    border-radius: 10px;
}

.user-info span {
    margin-right: 1rem;
}

.user-info a {
    color: #3498db;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
}

button {
    background: #3498db;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #2980b9;
}

.add-form {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.add-form input,
.add-form select {
    padding: 0.5rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    min-width: 200px;
}

.add-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    min-height: 100px;
}

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

.form-field label {
    font-weight: bold;
}

.table-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

table {
    background: #ffffff;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eeeeee;
}

th {
    background: #34495e;
    color: #ffffff;
}

tr:hover {
    background: #f8f9fa;
}

.flash {
    padding: 1rem;
    margin: 1rem 0;
    background: #e74c3c;
    color: #ffffff;
    border-radius: 4px;
}

.search-filter {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
}

.search-filter input,
.search-filter select {
    padding: 0.5rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
}

.search-filter button {
    padding: 0.5rem 1rem;
}

.pagination {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.pagination a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #3498db;
    border: 1px solid #dddddd;
    border-radius: 4px;
}

.pagination a.active {
    background: #3498db;
    color: #ffffff;
}

.pagination a:hover:not(.active) {
    background: #f8f9fa;
}

.system-title {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.system-title:hover {
    color: #007bff;
}

.nav-links a:focus-visible,
.system-title:focus-visible,
button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
    border-radius: 6px;
}

@media (max-width: 1024px) {
    :root {
        --nav-height: 64px;
    }

    .main-nav {
        flex-wrap: wrap;
        padding: 0.9rem 1.25rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-top: 0;
        padding-top: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.35s ease, opacity 0.3s ease;
    }

    .nav-links.open {
        max-height: 400px;
        opacity: 1;
        margin-top: 0.75rem;
        padding-top: 0.25rem;
        pointer-events: auto;
    }

    body.nav-open {
        overflow: hidden;
    }

    .container {
        padding: 0 1.25rem;
    }
}

@media (max-width: 600px) {
    :root {
        --nav-height: 58px;
    }

    .main-nav {
        padding: 0.75rem 1rem;
    }

    .nav-toggle-line {
        width: 1.5rem;
    }

    .nav-title {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1rem;
    }
}

