* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

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

button,
input {
    font: inherit;
}

.container {
    width: min(1150px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 44px;
    margin-bottom: 12px;
}

.hero p {
    color: #6b7280;
    margin-bottom: 30px;
}

.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-inner {
    width: min(1150px, calc(100% - 32px));
    min-height: 70px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.navbar h2 {
    font-size: 20px;
}

.navbar nav {
    display: flex;
    gap: 8px;
}

.navbar nav a {
    padding: 10px 15px;
    border-radius: 8px;
    color: #6b7280;
}

.navbar nav a:hover,
.navbar nav a.active {
    background: #eef2ff;
    color: #4f46e5;
}

main.container {
    padding-top: 35px;
    padding-bottom: 50px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 30px;
    margin-bottom: 7px;
}

.page-header p {
    color: #6b7280;
}

.btn-primary,
.btn-secondary,
.btn-edit,
.btn-delete {
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-edit {
    background: #e0e7ff;
    color: #3730a3;
}

.btn-delete {
    background: #fee2e2;
    color: #b91c1c;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 25px;
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.table-header h2 {
    font-size: 19px;
}

.table-header input {
    width: 250px;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
}

.table-header input:focus {
    border-color: #6366f1;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

th {
    background: #f9fafb;
    font-size: 13px;
    color: #6b7280;
}

td {
    font-size: 14px;
}

tbody tr:hover {
    background: #fafafa;
}

.actions {
    display: flex;
    gap: 7px;
}

.loading,
.empty,
.error {
    text-align: center;
    padding: 35px;
    color: #6b7280;
}

.error {
    color: #dc2626;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-box {
    width: min(500px, 100%);
    background: white;
    border-radius: 14px;
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 21px;
}

.modal-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
}

.form-group input:focus {
    border-color: #6366f1;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #111827;
    color: white;
    padding: 13px 18px;
    border-radius: 9px;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: #dc2626;
}

@media (max-width: 700px) {

    .navbar-inner {
        flex-direction: column;
        padding: 15px 0;
    }

    .navbar nav {
        width: 100%;
    }

    .navbar nav a {
        flex: 1;
        text-align: center;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .table-header {
        align-items: stretch;
        flex-direction: column;
    }

    .table-header input {
        width: 100%;
    }

    .hero h1 {
        font-size: 32px;
    }
}

@media print {

    .navbar,
    .page-header button {
        display: none;
    }

    body {
        background: white;
    }

    .container {
        width: 100%;
    }

    .card,
    .stat-card {
        border: 0;
    }
}