﻿:root {
    --primary-color: #558a80;
    /* Primary color requested: #558a80 */
    --primary-hover: #45736a;
    --text-color: #333;
    --text-light: #666;
    --bg-overlay: rgba(255, 255, 255, 0.9);
    --input-bg: #f0f4f8;
    --input-border: #dce0e4;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    /* Changed to Poppins */
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    margin: 0;
}

.login-body {
    height: 100vh;
    overflow: hidden;
}

/* Removed semi-transparent overlay for cleaner white look */
/* 
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}
*/

.left-logo-container {
    flex: 1;
    /* Takes up all remaining space to the left of login container */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.left-logo-container img {
    max-width: 450px;
    width: 80%;
    opacity: 0.95;
    animation: fadeIn 1s ease-out;
}

.login-container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.15), -2px 0 10px rgba(0, 0, 0, 0.05);
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    animation: slideInLeft 0.6s ease-out forwards;
    position: relative;
}

@keyframes slideInLeft {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-card {
    width: 100%;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container img {
    max-width: 220px;
    /* Slightly larger logo on login? User asked to enlarge logo, usually implies dashboard too */
    height: auto;
}

.mobile-logo-img {
    display: none;
    margin: 0 auto 30px auto;
    width: 65%;
    max-width: 280px;
}

.login-instruction {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
    text-align: left;
}

/* Floating Label Inputs */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: white;
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: 5px;
    font-size: 0.75rem;
    color: var(--primary-color);
    background: transparent;
    /* Or white if crossing border */
    transform: translateY(0);
}

/* Tweaking padding for floating label effect when focused */
.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    padding-top: 25px;
    padding-bottom: 5px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
}

.forgot-password {
    text-align: right;
    margin-bottom: 30px;
}

.forgot-password a {
    color: #4285f4;
    /* Typical link blue, or use primary if preferred */
    text-decoration: none;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    /* Orange/Red from logo */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.login-btn:hover {
    background-color: var(--primary-hover);
}

.footer-links {
    margin-top: 20px;
    text-align: left;
}

.footer-links a {
    color: #4285f4;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-footer {
    margin-top: 50px;
    text-align: center;
    color: var(--text-light);
}

.login-footer p {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.login-footer h3 {
    font-size: 1rem;
    color: var(--text-color);
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.custom-modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    background: #fcfcfc;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* Responsiveness */
@media (max-width: 768px) {
    body {
        justify-content: center;
        padding-right: 0;
        background-position: left;
    }

    .left-logo-container {
        display: none;
    }

    .login-container {
        max-width: 100%;
        background: #f7f9fb;
        box-shadow: none;
        padding: 5px 30px 30px 30px;
    }

    .mobile-logo-img {
        display: block;
        margin: -30px auto 20px auto;
        width: 60%;
    }
}

/* --- DASHBOARD STYLES --- */

.dashboard-body {
    background-image: none;
    /* Override login bg */
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    height: auto;
    padding-right: 0;
    min-height: 100vh;
}

.dashboard-body::before {
    display: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: width 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Collapsed State (Desktop only usually) */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-logo-full {
    display: none;
}

.sidebar.collapsed .sidebar-logo-small {
    display: block;
}

.sidebar.collapsed .sidebar-header {
    height: 60px;
    padding: 10px;
    justify-content: center;
}

/* Show small logo or icon in collapsed state if desired, for now keeping simple */

.sidebar.collapsed .sidebar-nav span,
.sidebar.collapsed .arrow-right {
    display: none;
}

.sidebar.collapsed .sidebar-footer .collapse-btn i {
    transform: rotate(180deg);
}

.sidebar-header {
    height: 80px;
    /* Taller header for bigger logo */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    padding: 10px;
    transition: all 0.3s;
}

.sidebar-logo-full {
    max-height: 50px;
    max-width: 90%;
    transition: all 0.3s;
}

.sidebar-logo-small {
    display: none;
    max-height: 32px;
    width: auto;
    transition: all 0.3s;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav>ul {
    list-style: none;
    padding-top: 10px;
    /* Reduced from 20px */
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    /* Slightly increased from 12px for better breathing room */
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.2s;
    font-size: 0.95rem;
    white-space: normal;
    /* Allow wrapping */
    line-height: 1.3;
    display: flex;
    align-items: center;
    /* Center icons with single line or start with multiple */
}

.sidebar-nav li a span {
    flex: 1;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: var(--primary-color);
    background: #fff5f5;
    border-left: 4px solid var(--primary-color);
}

.icon-container {
    width: 24px;
    text-align: center;
    margin-right: 15px;
    font-size: 1.1rem;
}

.sidebar-nav li a .arrow-right,
.sidebar-nav li a .arrow-down {
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--primary-color);
    /* Changed to primary green */
    transition: transform 0.3s;
}

.has-submenu.open .arrow-down {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Ensure no margin */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fafafa;
}

.has-submenu.open .submenu {
    max-height: 500px;
    /* Sufficient for sub-items */
    transition: max-height 0.3s ease-in;
}

.submenu li a {
    padding: 12px 25px 12px 64px !important;
    /* Deep indentation */
    font-size: 0.85rem !important;
    border-left: none !important;
}

.submenu li a:hover,
.submenu li a.active {
    background: #f0f0f0 !important;
    color: var(--primary-color) !important;
}

.sidebar.collapsed .has-submenu .submenu,
.sidebar.collapsed .has-submenu .arrow-down {
    display: none !important;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    text-align: right;
}

.collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-light);
    padding: 5px 10px;
    transition: transform 0.3s;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
    /* When sidebar is collapsed */
}

/* Top Bar */
.top-bar {
    height: 70px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-color);
    border-radius: 1px;
    transition: all 0.3s;
}

/* Menu Toggle Animation */
#menuToggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active span:nth-child(2) {
    opacity: 0;
}

#menuToggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.top-bar-title {
    font-size: 1.3rem;
    /* Slightly larger */
    font-weight: 600;
    color: var(--text-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Content Area */
.content-wrapper {
    padding: 40px;
    flex: 1;
    /* Push footer down */
}

.page-title {
    font-size: 2.2rem;
    color: #ccc;
    /* Lighter as per screenshot */
    font-weight: 300;
    margin-bottom: 25px;
}

.status-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 2px;
    font-size: 1rem;
    margin-bottom: 35px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    padding: 25px;
    transition: transform 0.2s;
    border: 1px solid #f5f5f5;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.card-header h2 {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
}

.card-icon {
    color: #bbb;
    font-size: 0.9rem;
}

.info-row {
    margin-bottom: 18px;
    font-size: 1rem;
}

.info-row.highlight {
    font-weight: 500;
    color: var(--primary-color);
}

.info-row .label {
    color: #999;
    display: block;
    font-size: 0.85em;
    margin-bottom: 4px;
}

.info-row .value {
    color: var(--text-color);
    font-weight: 400;
}

/* Footer Styles */
.main-footer {
    padding: 20px 40px;
    text-align: center;
    color: #aaa;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.main-footer a {
    color: #777;
    text-decoration: none;
    font-weight: 600;
}

.main-footer a:hover {
    color: var(--primary-color);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Dashboard Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        /* Fixed width on mobile, no collapse state usually */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-footer {
        display: none;
        /* Hide collapse button on mobile */
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.expanded {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .top-bar-title {
        display: none;
        /* Hide on small screens */
    }

    .content-wrapper {
        padding: 20px;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/* User Profile & Dropdown */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    position: relative;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.user-profile:hover {
    background-color: #f5f5f5;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin-top: 10px;
    border: 1px solid #eee;
}

.user-dropdown.show {
    display: flex;
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fdfdfd;
}

.dropdown-header strong {
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
}

.dropdown-header span {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 5px;
}

.dropdown-item {
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.text-danger {
    color: #d32f2f !important;
}

.text-danger:hover {
    background-color: #fff5f5;
}

/* Sidebar Logout Specifics */
.sidebar-nav ul {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.logout-item {
    margin-top: auto;
    /* Push to bottom if the spacer index doesn't work or as fallback */
    border-top: 1px solid #f0f0f0;
}

.logout-item a {
    color: #D32F2F !important;
}

.logout-item a:hover {
    background-color: #fff5f5 !important;
}

/* --- Formularios y Tarjetas de Datos Personales --- */
.form-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.form-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.form-body {
    padding: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.text-danger {
    color: var(--primary-color);
    display: inline-block;
    margin-left: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #d5d5d5;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

.form-note {
    font-size: 0.85rem;
    color: #666;
    margin-left: 10px;
}

/* --- Soporte --- */
.support-container {
    max-width: 800px;
    margin: 0 auto;
}

.support-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.support-header {
    margin-bottom: 25px;
}

.support-header h2 {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.support-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.file-input-container {
    border: 2px dashed #eee;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.file-input-container:hover {
    background: #fdfdfd;
    border-color: #ddd;
}

.file-input-container i {
    font-size: 2rem;
    color: #ddd;
    margin-bottom: 10px;
}

.file-list {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: left;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-size: 1rem;
}

.submit-btn:hover {
    background: var(--primary-hover);
}

.file-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

/* Clean Table Styles */
.clean-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    /* Spacing between rows for aesthetic */
    margin-top: 20px;
}

@media screen and (min-width: 769px) {
    .clean-table {
        min-width: 800px;
    }
}

.clean-table th {
    text-align: left;
    padding: 15px 20px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #edeff2;
}

.clean-table td {
    background: white;
    padding: 12px 15px;
    color: var(--text-color);
    font-size: 0.95rem;
    border-top: 1px solid #f9f9f9;
    border-bottom: 1px solid #f9f9f9;
}

.clean-table td:first-child {
    border-left: 1px solid #f9f9f9;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.clean-table td:last-child {
    border-right: 1px solid #f9f9f9;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.clean-table tr:hover td {
    background-color: #fdfdfd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
    transition: all 0.2s;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    gap: 5px;
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(85, 138, 128, 0.2);
}

.btn-download i {
    font-size: 0.9rem;
}

/* Responsive Card View for Mobile */
@media screen and (max-width: 768px) {
    .clean-table {
        border-spacing: 0;
        margin-top: 10px;
    }

    .clean-table thead {
        display: none;
    }

    .clean-table tbody,
    .clean-table tr,
    .clean-table td {
        display: block;
        width: 100%;
    }

    .clean-table tr {
        margin-bottom: 25px;
        /* Increased spacing */
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        /* Stronger shadow */
        border: 1px solid #eee;
        border-left: 5px solid var(--primary-color);
        /* Visual accent to mark start of card */
        overflow: hidden;
    }

    .clean-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        position: relative;
        gap: 10px;
    }

    .clean-table td:last-child {
        border-bottom: none;
    }

    .clean-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #888;
        font-size: 0.85rem;
        text-transform: uppercase;
        margin-right: 15px;
        text-align: left;
    }

    /* Remove table-specific border radii adjustments from desktop */
    .clean-table td:first-child,
    .clean-table td:last-child {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .clean-table td:last-child {
        border-bottom: none;
    }

    .mobile-hidden {
        display: none !important;
    }
}

.recibo-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.recibo-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.recibo-link i {
    color: #888;
}

/* Filter Styles */
.filter-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    background: white;
    padding: 12px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.filter-control {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
    color: var(--text-color);
    font-size: 0.9rem;
    min-width: 130px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.filter-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(85, 138, 128, 0.1);
    background-color: white;
}

/* Tablet and Mobile Optimization */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 15px 10px !important;
        /* Much less padding on mobile */
    }

    .page-title {
        font-size: 1.5rem !important;
        /* Smaller titles */
        margin-bottom: 10px !important;
    }

    .card {
        padding: 15px;
        /* Tighter cards */
    }

    .top-bar {
        padding: 0 15px;
    }

    .top-bar-title {
        font-size: 1.1rem;
    }

    .libreta-header {
        margin-bottom: 10px !important;
    }

    /* Filter Mobile Adjustments */
    .filter-container {
        padding: 15px;
        gap: 15px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .filter-control {
        flex: 1;
        min-width: 0;
        max-width: 60%;
    }

    /* Mobile Sidebar Rules */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        /* Slightly wider on mobile for better touch experience */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .menu-toggle {
        display: flex;
    }
}

.btn-download.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: #f9f9f9 !important;
    color: #aaa !important;
    border-color: #eee !important;
    filter: grayscale(1) !important;
}