* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}

.modal-open {
    overflow: hidden;
}

a {
    color: #e9711c;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: linear-gradient(120deg, #ff8a3d, #ff6a00);
    color: #fff;
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.topbar__title {
    margin: 0;
    font-size: 1.1rem;
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    display: block;
}

.layout {
    display: flex;
    min-height: calc(100vh - 140px);
}

.sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.sidebar__section-title {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #9aa5b1;
    margin: 1rem 0 0.5rem;
}

.sidebar__menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar__menu li {
    margin-bottom: 0.5rem;
}

.sidebar__menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #1f2933;
    background: #f4f4f4;
}

.sidebar__menu a:hover {
    background: #ffe3cf;
}

.sidebar__menu--secondary a {
    background: transparent;
    color: #e9711c;
    font-weight: 500;
}

.content {
    flex: 1;
    padding: 2rem;
}

.footer {
    text-align: center;
    padding: 1rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.btn {
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease;
    display: inline-block;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(120deg, #ff8a3d, #ff6a00);
    color: #fff;
}

.btn-secondary {
    background: #fff4ec;
    color: #d05a00;
    border: 1px solid #ffb78a;
}

.btn-light {
    background: #f3f4f6;
    color: #1f2933;
    border: 1px solid #e5e7eb;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-danger {
    background: #f44336;
    color: #fff;
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card__icon {
    font-size: 1.5rem;
    color: #ff6a00;
}

.card__description {
    color: #4b5563;
    flex: 1;
}

.empty-card {
    align-items: center;
    text-align: center;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-principal {
    background: #fff;
    color: #ff6a00;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(15, 23, 42, 0.05);
}

.table th,
.table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f1f1;
    text-align: left;
}

.table th {
    background: #fff4ec;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #d05a00;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions form {
    margin: 0;
}

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

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

.form-card {
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
}

.form-group--full {
    grid-column: 1 / -1;
}

.checkbox label {
    font-weight: 500;
}

.form-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff6a00, #ffb347);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
}

.auth-card__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card__header h1 {
    margin: 0;
    color: #ff6a00;
}

.form__link {
    text-align: center;
    margin-top: 0.85rem;
}

.footer small {
    color: #6b7280;
}

.modal-confirm {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-confirm.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-confirm__dialog {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    width: min(92%, 420px);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

.modal-confirm__message {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    color: #1f2933;
    line-height: 1.4;
}

.modal-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 960px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .topbar__user {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .table-actions {
        flex-direction: column;
    }
}
