/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    min-height: 100vh;
}

/* Sidebar lateral colapsable */
.sidebar {
    width: 70px;
    background: linear-gradient(135deg, #2d164c 0%, #062156 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: width 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar:hover {
    width: 250px;
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover .sidebar-header h1 {
    opacity: 1;
}

.sidebar-logo {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #ddff19;
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #ddff19;
    font-weight: 500;
}

.sidebar-icon {
    font-size: 20px;
    min-width: 40px;
    text-align: center;
}

.sidebar-text {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover .sidebar-text {
    opacity: 1;
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: 70px;
    transition: margin-left 0.3s ease;
    padding: 20px;
    min-height: 100vh;
}

.sidebar:hover ~ .main-content {
    margin-left: 250px;
}

/* Header dentro del contenido */
.page-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.page-header h1 {
    color: #2d164c;
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1rem;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Main content */
main {
    min-height: 60vh;
    margin-bottom: 3rem;
}

/* Dashboard */
.dashboard {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #2d164c 0%, #062156 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #ddff19;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(45, 22, 76, 0.2);
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.quick-actions {
    text-align: center;
}

.quick-actions h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2d164c 0%, #062156 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(45, 22, 76, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Formularios */
.factura-form, .email-form, .filtros-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Items de factura */
#items-container {
    margin-bottom: 1rem;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.item-total {
    background: #e9ecef;
    font-weight: bold;
}

.remove-item {
    padding: 0.5rem;
    min-width: 40px;
}

.totales-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.total-final {
    font-size: 1.3rem;
    font-weight: bold;
    border-top: 2px solid #ddd;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d1edff;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Factura preview */
.success-message {
    background: #d1edff;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
}

.factura-preview {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.factura-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
}

.empresa-info h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.factura-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.cliente-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.items-table th,
.items-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.items-table th {
    background: #667eea;
    color: white;
    font-weight: 500;
}

.items-table tr:hover {
    background: #f8f9fa;
}

.factura-totales {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.factura-notas {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

/* Sección de datos de pago en cotizaciones */
.datos-pago-section {
    background: #e8f5e9;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4caf50;
}

.datos-pago-section h4 {
    color: #2e7d32;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.pago-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pago-item {
    padding: 0.5rem;
}

.pago-item.full-width {
    grid-column: 1 / -1;
}

.pago-item strong {
    display: block;
    color: #555;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.pago-item span {
    color: #333;
    font-weight: 500;
}

/* Sección de condiciones adicionales en cotizaciones */
.condiciones-section {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2196f3;
}

.condiciones-section h4 {
    color: #1565c0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.condiciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.condicion-item {
    padding: 0.5rem;
}

.condicion-item strong {
    display: block;
    color: #555;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.condicion-item span {
    color: #333;
    font-weight: 500;
}

/* Badges para estados */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-pendiente {
    background: #fff3cd;
    color: #856404;
}

.badge-aceptada {
    background: #d1edff;
    color: #155724;
}

.badge-rechazada {
    background: #f8d7da;
    color: #721c24;
}

.badge-vencida {
    background: #e2e3e5;
    color: #383d41;
}

/* Lista de facturas */
.filtros-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.totales-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.total-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.total-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.total-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.facturas-list {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
}

.facturas-table {
    width: 100%;
    border-collapse: collapse;
}

.facturas-table th,
.facturas-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.facturas-table th {
    background: #667eea;
    color: white;
    font-weight: 500;
}

.facturas-table tr:hover {
    background: #f8f9fa;
}

.estado-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.estado-pendiente {
    background: #fff3cd;
    color: #856404;
}

.estado-pagada {
    background: #d1edff;
    color: #155724;
}

.estado-cancelada {
    background: #f8d7da;
    color: #721c24;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Email form */
.email-form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.factura-info-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.email-preview {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 1.5rem;
}

.preview-content {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.preview-text {
    white-space: pre-wrap;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    border-top: 1px solid #ddd;
    margin-top: 3rem;
}

/* Responsive */
/* ========================================
   MOBILE-FIRST: Navegación y Layout
   ======================================== */

/* Hamburger button */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2d164c 0%, #062156 100%);
    color: white;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.hamburger-btn:active {
    transform: scale(0.92);
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Bottom navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    justify-content: space-around;
    align-items: center;
    height: 65px;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    color: #888;
    text-decoration: none;
    font-size: 0.65rem;
    border-radius: 8px;
    transition: all 0.2s;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-link i {
    font-size: 1.2rem;
    transition: color 0.2s;
}

.bottom-nav-link span {
    font-size: 0.6rem;
    font-weight: 500;
}

.bottom-nav-link.active {
    color: #2d164c;
}

.bottom-nav-link.active i {
    color: #2d164c;
}

.bottom-nav-link:active {
    background: #f0f0f0;
}

/* ========================================
   TABLET (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    body {
        padding-bottom: 75px;
        padding-top: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .bottom-nav {
        display: flex;
    }

    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0,0,0,0.3);
    }

    .sidebar:hover {
        width: 280px;
    }

    .sidebar-header h1 {
        opacity: 1;
    }

    .sidebar-text {
        opacity: 1;
    }

    .sidebar-link {
        padding: 14px 18px;
    }

    .sidebar-icon {
        font-size: 22px;
        min-width: 44px;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 60px 0 0;
    }

    .sidebar:hover ~ .main-content {
        margin-left: 0 !important;
    }

    .container {
        padding: 0 12px;
    }

    .page-header {
        padding: 16px;
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .item-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .factura-header {
        flex-direction: column;
        gap: 1rem;
    }

    .totales-resumen {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 12px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 48px;
    }

    .btn-sm {
        padding: 10px 14px;
        min-height: 40px;
        font-size: 0.9rem;
    }

    .factura-form, .email-form, .filtros-form {
        padding: 1rem;
    }

    .filtros-section {
        padding: 1rem;
    }

    .facturas-list {
        padding: 1rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card {
        padding: 1rem;
    }

    /* Tablas → Cards */
    .facturas-table,
    .items-table {
        border: 0;
    }

    .facturas-table thead,
    .items-table thead {
        display: none;
    }

    .facturas-table tbody tr,
    .items-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        overflow: hidden;
    }

    .facturas-table td,
    .items-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
        gap: 8px;
    }

    .facturas-table td:last-child,
    .items-table td:last-child {
        border-bottom: none;
    }

    .facturas-table td::before,
    .items-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 0.85rem;
        text-align: left;
        flex-shrink: 0;
    }

    .facturas-table td:empty::before,
    .items-table td:empty::before {
        display: none;
    }

    .facturas-table td .action-buttons {
        flex-direction: row;
        justify-content: flex-end;
        gap: 8px;
    }

    .table-responsive {
        font-size: 0.9rem;
        overflow-x: visible;
    }

    /* Dashboard */
    .dashboard {
        padding: 1rem;
    }

    .pago-grid,
    .condiciones-grid {
        grid-template-columns: 1fr;
    }

    /* Recordatorios */
    .recordatorios-grid {
        grid-template-columns: 1fr;
    }

    .email-form-container {
        padding: 1rem;
    }

    /* Chart cards */
    .chart-card {
        border-left-width: 3px;
    }

    .chart-card h3 {
        font-size: 0.95rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    /* More touch-friendly */
    .sidebar-link {
        min-height: 48px;
    }

    a, button, .btn, .sidebar-link, .bottom-nav-link {
        -webkit-tap-highlight-color: transparent;
    }

    .totales-section {
        padding: 1rem;
    }

    .total-row {
        font-size: 0.95rem;
    }

    .total-final {
        font-size: 1.1rem;
    }
}

/* ========================================
   PHONE (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.2rem;
    }

    .stat-card h3 {
        font-size: 0.85rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .bottom-nav {
        height: 58px;
    }

    .bottom-nav-link i {
        font-size: 1.1rem;
    }

    .bottom-nav-link span {
        font-size: 0.55rem;
    }

    .container {
        padding: 0 8px;
    }

    .factura-form, .email-form, .filtros-form {
        padding: 0.75rem;
    }

    .facturas-table td,
    .items-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .sidebar {
        width: 260px;
    }

    .hamburger-btn {
        top: 8px;
        left: 8px;
        width: 40px;
        height: 40px;
    }

    .main-content {
        padding: 52px 0 0;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.95rem;
        min-height: 44px;
    }
}

/* ========================================
   PULL-TO-REFRESH (spinner)
   ======================================== */
.pull-to-refresh-indicator {
    display: none;
    text-align: center;
    padding: 20px;
    color: #2d164c;
}

.pull-to-refresh-indicator.active {
    display: block;
}

.pull-to-refresh-indicator .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top-color: #2d164c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #2e7d32;
}

.toast.error {
    background: #c62828;
}

/* Swipe action hint */
.swipe-hint {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .facturas-table tbody tr {
        position: relative;
        overflow: hidden;
    }

    .facturas-table tbody tr.swiping {
        transition: transform 0.1s linear;
    }

    .facturas-table tbody tr.swipe-deleted {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
}

/* Landscape phone support */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }

    .bottom-nav {
        height: 50px;
    }

    .bottom-nav-link i {
        font-size: 1rem;
    }

    .bottom-nav-link span {
        display: none;
    }

    body {
        padding-bottom: 60px;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
