/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, #f0f4ff 0%, #d9e2f0 100%);
    min-height: 100vh;
    padding: 1.5rem;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 10, 30, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 60px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #3d4b68;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    color: #1a263b;
}

.nav-links a i {
    font-size: 1rem;
}

.nav-links a.hidden {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 1rem 0.5rem 0.8rem;
    background: white;
    border-radius: 40px;
    border: 1px solid #e3eaf5;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #b0c2dd;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2a3b5e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    color: #1a263b;
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-type {
    font-size: 0.7rem;
    color: #6a7a9a;
    background: #eef3fc;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-weight: 500;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fee;
    color: #c62828;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 0.8rem;
    width: 100%;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a263b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title i {
    color: #4a6fa5;
    font-size: 1.4rem;
}

.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 0.4rem 0.9rem;
    background: #1a263b;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #2f3f62;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 38, 59, 0.25);
}

.btn-primary i {
    font-size: 0.8rem;
}

/* ===== FILTROS ===== */
.filters-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 10, 30, 0.06);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.75rem;
    color: #1f2a44;
}

.filter-input {
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    background: white;
    transition: border 0.2s;
    width: 100%;
}

.filter-input:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.filter-select {
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    background: white;
    transition: border 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
    width: 100%;
}

.filter-select:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-filter {
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.btn-filter-primary {
    background: #1a263b;
    color: white;
}

.btn-filter-primary:hover {
    background: #2f3f62;
    transform: translateY(-2px);
}

.btn-filter-secondary {
    background: #eef3fc;
    color: #1a263b;
}

.btn-filter-secondary:hover {
    background: #dbe1ed;
    transform: translateY(-2px);
}

/* ===== TABLA ===== */
.table-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 10, 30, 0.06);
    width: 100%;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.table-info {
    color: #6a7a9a;
    font-size: 0.8rem;
    font-weight: 500;
}

.table-info span {
    color: #1a263b;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 700px;
}

thead {
    background: rgba(42, 59, 94, 0.05);
    border-radius: 0.5rem;
}

th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    color: #1a263b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #2a3b5e;
    vertical-align: middle;
}

tr:hover td {
    background: rgba(42, 59, 94, 0.02);
}

/* ===== FILA CLICKEABLE ===== */
.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover td {
    background: rgba(42, 59, 94, 0.04);
}

.clickable-row.expanded td {
    background: rgba(42, 59, 94, 0.06);
}

/* ===== FILA DE ACCIONES DESPLEGABLE ===== */
.actions-row td {
    padding: 0 !important;
    border-bottom: none !important;
}

.actions-row .actions-container {
    display: none;
    padding: 0.8rem 1rem;
    background: rgba(248, 250, 255, 0.9);
    border-top: 2px solid rgba(42, 59, 94, 0.08);
    border-bottom: 2px solid rgba(42, 59, 94, 0.08);
    gap: 0.6rem;
    flex-wrap: wrap;
}

.actions-row .actions-container.show {
    display: flex;
}

.actions-row .btn-action {
    padding: 0.35rem 0.9rem;
    border: none;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.actions-row .btn-action:hover {
    transform: scale(1.05);
}

.btn-edit-action {
    background: #e3f2fd;
    color: #0d47a1;
}

.btn-edit-action:hover {
    background: #bbdefb;
}

.btn-delete-action {
    background: #fce4ec;
    color: #c62828;
}

.btn-delete-action:hover {
    background: #f8bbd0;
}

.btn-toggle-action {
    background: #fff3e0;
    color: #e65100;
}

.btn-toggle-action:hover {
    background: #ffe0b2;
}

.btn-reset-action {
    background: #e8eaf6;
    color: #1a237e;
}

.btn-reset-action:hover {
    background: #c5cae9;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-inactive {
    background: #fce4ec;
    color: #c62828;
}

.badge-admin {
    background: #e3f2fd;
    color: #0d47a1;
}

.badge-gestor {
    background: #e8eaf6;
    color: #1a237e;
}

.badge-visitante {
    background: #fff3e0;
    color: #e65100;
}

.highlight {
    background: #fff3cd;
    padding: 0.05rem 0.2rem;
    border-radius: 3px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6a7a9a;
}

.empty-state i {
    font-size: 2.5rem;
    color: #dbe1ed;
    margin-bottom: 0.8rem;
    display: block;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== MODAL DE USUARIO ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a263b;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6a7a9a;
    transition: color 0.2s;
    padding: 0.2rem 0.5rem;
}

.modal-close:hover {
    color: #1a263b;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.8rem;
    color: #1f2a44;
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
}

.form-group small {
    display: block;
    color: #6a7a9a;
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 0.8rem;
    background: #1a263b;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
    background: #2f3f62;
}

.btn-cancel {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    color: #6a7a9a;
    border: 1px solid #dbe1ed;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
}

.btn-cancel:hover {
    background: #f5f7fa;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ===== MODAL DE CONFIRMACIÓN GENERAL ===== */
.modal-confirm {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-confirm.active {
    display: flex;
}

.modal-confirm-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-confirm-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-confirm-icon.warning {
    color: #e65100;
}

.modal-confirm-icon.danger {
    color: #dc3545;
}

.modal-confirm-icon.info {
    color: #0d47a1;
}

.modal-confirm-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a263b;
    margin-bottom: 0.5rem;
}

.modal-confirm-message {
    text-align: center;
    color: #4a5a7a;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-confirm-message .highlight-text {
    color: #c62828;
    font-weight: 600;
}

.modal-confirm-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.modal-confirm-actions .btn-cancel-confirm {
    padding: 0.6rem 1.8rem;
    background: #eef3fc;
    color: #1a263b;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.modal-confirm-actions .btn-cancel-confirm:hover {
    background: #dbe1ed;
}

.modal-confirm-actions .btn-confirm-action {
    padding: 0.6rem 1.8rem;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.modal-confirm-actions .btn-confirm-action.danger {
    background: #dc3545;
    color: white;
}

.modal-confirm-actions .btn-confirm-action.danger:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

.modal-confirm-actions .btn-confirm-action.warning {
    background: #e65100;
    color: white;
}

.modal-confirm-actions .btn-confirm-action.warning:hover {
    background: #bf360c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 81, 0, 0.3);
}

.modal-confirm-actions .btn-confirm-action.info {
    background: #0d47a1;
    color: white;
}

.modal-confirm-actions .btn-confirm-action.info:hover {
    background: #0a2e6e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 71, 161, 0.3);
}

/* ===== MODAL DE CONTRASEÑA ===== */
.modal-password {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-password.active {
    display: flex;
}

.modal-password-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-password-icon {
    text-align: center;
    font-size: 3rem;
    color: #1a237e;
    margin-bottom: 1rem;
}

.modal-password-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a263b;
    margin-bottom: 0.5rem;
}

.modal-password-message {
    text-align: center;
    color: #4a5a7a;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-password-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border 0.2s;
    margin-bottom: 0.5rem;
}

.modal-password-input:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.modal-password-hint {
    text-align: center;
    color: #6a7a9a;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-password-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.modal-password-actions .btn-cancel-password {
    padding: 0.6rem 1.8rem;
    background: #eef3fc;
    color: #1a263b;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.modal-password-actions .btn-cancel-password:hover {
    background: #dbe1ed;
}

.modal-password-actions .btn-confirm-password {
    padding: 0.6rem 1.8rem;
    background: #1a263b;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.modal-password-actions .btn-confirm-password:hover {
    background: #2f3f62;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 38, 59, 0.25);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1a263b;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 0.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    animation: slideUp 0.3s ease;
    max-width: 90%;
    text-align: center;
    font-size: 0.9rem;
}

.toast.success {
    background: #2e7d32;
}

.toast.error {
    background: #c62828;
}

.toast.warning {
    background: #e65100;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    body {
        padding: 1rem;
    }
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1.2rem;
        border-radius: 1.5rem;
        width: 100%;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
        width: 100%;
    }
    .nav-links a {
        font-size: 0.85rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }
    .filter-group {
        min-width: 100%;
        width: 100%;
    }
    .filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    .filter-actions .btn-filter {
        flex: 1;
        justify-content: center;
    }
    .table-container {
        padding: 1rem;
    }
    table {
        font-size: 0.8rem;
        min-width: 600px;
    }
    th, td {
        padding: 0.5rem 0.6rem;
    }
    .actions-row .btn-action {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }
    .modal-confirm-content, .modal-password-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    .modal-confirm-actions, .modal-password-actions {
        flex-direction: column;
    }
    .modal-confirm-actions .btn-cancel-confirm,
    .modal-confirm-actions .btn-confirm-action,
    .modal-password-actions .btn-cancel-password,
    .modal-password-actions .btn-confirm-password {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 700px) {
    body {
        padding: 0.8rem;
    }
    .navbar {
        padding: 0.7rem 1rem;
        border-radius: 1.2rem;
        gap: 0.6rem;
        width: 100%;
    }
    .logo-icon {
        width: 48px;
        height: 48px;
    }
    .nav-links a {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    .nav-links a i {
        font-size: 0.8rem;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .user-name {
        font-size: 0.75rem;
        max-width: 70px;
    }
    .logout-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
    .page-header {
        margin-bottom: 1rem;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    .page-title {
        font-size: 1.1rem;
        justify-content: center;
        width: 100%;
    }
    .page-title i {
        font-size: 1rem;
    }
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    .btn-primary {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
        width: 100%;
        justify-content: center;
    }
    .btn-primary i {
        font-size: 0.7rem;
    }
    .filters-container {
        padding: 0.8rem;
        border-radius: 1.2rem;
        width: 100%;
    }
    .filter-group label {
        font-size: 0.7rem;
    }
    .filter-input, .filter-select {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        border-radius: 8px;
    }
    .btn-filter {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
    .table-container {
        padding: 0.8rem;
        border-radius: 1.2rem;
        width: 100%;
    }
    .table-info {
        font-size: 0.7rem;
    }
    table {
        font-size: 0.7rem;
        min-width: 500px;
    }
    th {
        font-size: 0.6rem;
        padding: 0.4rem 0.4rem;
    }
    td {
        font-size: 0.7rem;
        padding: 0.4rem 0.4rem;
    }
    .badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
    }
    .modal-content {
        padding: 1rem;
        border-radius: 1.2rem;
    }
    .modal-title {
        font-size: 1rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .form-group {
        margin-bottom: 0.8rem;
    }
    .form-group input, .form-group select {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    .btn-submit, .btn-cancel {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
    .actions-row .btn-action {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
    .modal-confirm-content, .modal-password-content {
        padding: 1.2rem;
    }
    .modal-confirm-icon, .modal-password-icon {
        font-size: 2.5rem;
    }
    .modal-confirm-title, .modal-password-title {
        font-size: 1rem;
    }
    .modal-confirm-message, .modal-password-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    .navbar {
        padding: 0.5rem 0.7rem;
        border-radius: 1rem;
        gap: 0.4rem;
        width: 100%;
    }
    .logo-icon {
        width: 100px;
        height: 40px;
    }
    .nav-links a {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    .nav-links a i {
        font-size: 0.7rem;
    }
    .nav-links a span {
        display: none;
    }
    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    .user-name {
        font-size: 0.6rem;
        max-width: 40px;
    }
    .user-type {
        display: none;
    }
    .logout-btn {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    .logout-btn span {
        display: none;
    }
    .page-title {
        font-size: 0.95rem;
        justify-content: center;
    }
    .page-title i {
        font-size: 0.85rem;
    }
    .btn-primary {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        width: 100%;
        justify-content: center;
    }
    .btn-primary i {
        font-size: 0.65rem;
    }
    .filters-container {
        padding: 0.6rem;
        gap: 0.5rem;
        width: 100%;
    }
    .filter-group label {
        font-size: 0.6rem;
    }
    .filter-input, .filter-select {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
    }
    .btn-filter {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
    }
    .table-container {
        padding: 0.6rem;
        border-radius: 1rem;
        width: 100%;
    }
    table {
        font-size: 0.6rem;
        min-width: 450px;
    }
    th {
        font-size: 0.55rem;
        padding: 0.3rem 0.3rem;
    }
    td {
        font-size: 0.6rem;
        padding: 0.3rem 0.3rem;
    }
    .badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
    }
    .empty-state {
        padding: 1.2rem;
    }
    .empty-state i {
        font-size: 2rem;
    }
    .empty-state p {
        font-size: 0.75rem;
    }
    .actions-row .btn-action {
        font-size: 0.55rem;
        padding: 0.2rem 0.4rem;
    }
    .modal-confirm-content, .modal-password-content {
        padding: 1rem;
    }
    .modal-confirm-icon, .modal-password-icon {
        font-size: 2rem;
    }
}

@media (max-width: 380px) {
    body {
        padding: 0.3rem;
    }
    table {
        min-width: 400px;
        font-size: 0.55rem;
    }
    th, td {
        padding: 0.2rem 0.2rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }
    .navbar {
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.8rem;
        width: 100%;
    }
    .page-header {
        margin-bottom: 0.6rem;
    }
    .page-title {
        font-size: 1rem;
    }
    .filters-container {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5rem 0.8rem;
    }
    .filter-group {
        flex: 1;
        min-width: 120px;
    }
    .filter-actions {
        flex: 0 1 auto;
        min-width: 100px;
    }
    .table-container {
        padding: 0.6rem;
    }
    table {
        font-size: 0.65rem;
        min-width: 450px;
    }
    .modal-confirm-content, .modal-password-content {
        padding: 1rem;
        max-width: 400px;
    }
    .modal-confirm-actions, .modal-password-actions {
        flex-direction: row;
    }
    .modal-confirm-actions .btn-cancel-confirm,
    .modal-confirm-actions .btn-confirm-action,
    .modal-password-actions .btn-cancel-password,
    .modal-password-actions .btn-confirm-password {
        padding: 0.4rem 1.2rem;
        font-size: 0.8rem;
    }
    .modal-confirm-icon, .modal-password-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    .modal-confirm-message, .modal-password-message {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
}