*, *::before, *::after { box-sizing: border-box; }

html, body {
    background-color: #fff;
    color: #636b6f;
    font-family: 'Raleway', sans-serif;
    font-weight: 100;
    min-height: 100vh;
    margin: 0;
}

.flex-center {
    display: flex;
    align-items: start;
    justify-content: center;
    min-height: calc(100vh - 50px);
}

.card {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

.title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

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

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #636b6f;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: #636b6f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    margin-top: 0.5rem;
}

.btn:hover {
    background-color: #4a5055;
}

.btn-danger {
    background-color: #e3342f;
}

.btn-danger:hover {
    background-color: #cc1f1a;
}

.error {
    color: #e3342f;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

.links {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.links a {
    color: #636b6f;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.header-brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: #636b6f;
    text-decoration: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav a {
    color: #636b6f;
    text-decoration: none;
    font-size: 0.875rem;
}

.header-nav a:hover {
    text-decoration: underline;
}

.header-nav a.active {
    font-weight: 600;
    text-decoration: underline;
}

.header-nav button {
    background: none;
    border: none;
    color: #636b6f;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.header-nav button:hover {
    text-decoration: underline;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
}

.card-item-value {
    margin: 0;
    font-size: 1rem;
}

.text-center {
    text-align: center;
}

.loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
}

.loader-overlay-active {
    display: flex;
}

.loader-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e0e0e0;
    border-top-color: #636b6f;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.table-container {
    overflow-x: auto;
}

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

.table thead tr {
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #636b6f;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

.table tbody tr:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.table .text-right {
    text-align: right;
}

.table .text-center {
    text-align: center;
}

.table .whitespace-nowrap {
    white-space: nowrap;
}

.text-red {
    color: #e3342f;
}

.text-green {
    color: #38c172;
}

.text-gray {
    color: #b8c2cc;
}

.text-muted {
    color: #636b6f;
    opacity: 0.7;
}

.font-medium {
    font-weight: 500;
}

.italic {
    font-style: italic;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-0 {
    margin-top: 0;
}

.w-auto {
    width: auto;
}

.text-sm {
    font-size: 0.875rem;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #636b6f;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-card {
    background: white;
    max-width: 500px;
    padding: 2rem;
    border-radius: 8px;
}

.modal-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.modal-text {
    margin-bottom: 1.5rem;
}

.gap-4 {
    gap: 1rem;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #d0d0d0;
}