/* ==== Reset básico ==== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7fb;
    color: #333;
}

/* ==== Layout general ==== */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

/* ==== Menú lateral ==== */
.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background-color: #0057b7;
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0057b7, #003c80);
    color: #fff;
    padding: 1.5rem 1.2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.sidebar-header img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #fff;
    object-fit: contain;
}

.sidebar-header span {
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-user {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.sidebar-user p + p {
    margin-top: 0.25rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    color: #e3f2fd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover {
    background-color: rgba(255,255,255,0.12);
    color: #ffffff;
}

/* ==== Topbar ==== */
.topbar {
    margin-left: 0;
    padding: 0.5rem 0.5rem 1rem;
    text-align: center;
}

.topbar h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #004080;
}

/* ==== Panel de ventas ==== */
.main-content {
    margin-top: 0.5rem;
}

/* Filtros */
.filters {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: #ffffff;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.field-group {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1;
}

.field-group label {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.field-group input[type="text"],
.field-group input[type="date"] {
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}

.field-group.buttons {
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Botones */
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-primary {
    background-color: #0057b7;
    color: #fff;
}

.btn-primary:hover {
    background-color: #00418a;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #1e293b;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

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

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

/* Tabla */
.table-section {
    margin-bottom: 1.5rem;
}

.table-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.table-header {
    padding: 0.75rem 1.2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(90deg, #0057b7, #1583d8);
    color: #fff;
}

.table-header h2 {
    font-size: 1rem;
    font-weight: 500;
}

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

.ventas-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.ventas-table th,
.ventas-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.ventas-table thead {
    background-color: #e3f2fd;
}

.ventas-table th {
    text-align: left;
    color: #084074;
    font-weight: 600;
}

.ventas-table tbody tr:nth-child(even) {
    background-color: #f9fbff;
}

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

.link-action {
    color: #0057b7;
    text-decoration: none;
    font-weight: 500;
}

.link-action:hover {
    text-decoration: underline;
}

.no-data {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Sección de acciones (cerrar turno) */
.actions-section {
    text-align: right;
    margin-top: 1rem;
}

/* Footer */
.footer {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 2rem;
}

/* ==== Responsive ==== */
@media (min-width: 992px) {
    .layout {
        padding-left: 280px;
    }
    .menu-toggle {
        display: none;
    }
    .sidebar {
        transform: translateX(0);
    }
    .topbar {
        text-align: left;
    }
}

@media (max-width: 991px) {
    .layout {
        padding-top: 4rem;
    }
    .topbar {
        margin-top: 0.5rem;
    }
    .field-group {
        min-width: 100%;
    }
}

/* ====== LOGIN ====== */
.login-body {
    background: radial-gradient(circle at top, #1583d8 0, #0057b7 35%, #002b5c 70%, #0b1726 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f9fafb;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
    color: #1f2933;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.login-logo h1 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    color: #0057b7;
}

.login-logo p {
    font-size: 0.9rem;
    color: #6b7280;
}

.login-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.login-field {
    display: flex;
    flex-direction: column;
}

.login-field label {
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
    color: #4b5563;
}

.login-field input {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
}

.login-field input:focus {
    outline: none;
    border-color: #0057b7;
    box-shadow: 0 0 0 2px rgba(0,87,183,0.25);
}

.login-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
}
/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7fb;
    color: #333;
}

/* Login */
.login-body {
    background: radial-gradient(circle at top, #1583d8 0, #0057b7 35%, #002b5c 70%, #0b1726 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}
.login-card {
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
    color: #1f2933;
}
.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}
.login-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}
.login-logo h1 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    color: #0057b7;
}
.login-logo p {
    font-size: 0.9rem;
    color: #6b7280;
}
.login-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.login-field label {
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
    color: #4b5563;
}
.login-field input {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
}
.btn-primary.login-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Menú lateral / layout */
.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background-color: #0057b7;
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0057b7, #003c80);
    color: #fff;
    padding: 1.5rem 1.2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}
.sidebar-open {
    transform: translateX(0);
}
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.sidebar-header img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #fff;
    object-fit: contain;
}
.sidebar-header span {
    font-weight: 600;
    font-size: 1.1rem;
}
.sidebar-user {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.sidebar-nav a {
    display: block;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    color: #e3f2fd;
    text-decoration: none;
    font-size: 0.9rem;
}
.sidebar-nav a:hover {
    background-color: rgba(255,255,255,0.12);
}

/* Layout principal */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}
.topbar {
    text-align: center;
    margin-top: 2.5rem;
}
.topbar h1 {
    font-size: 1.6rem;
    color: #004080;
}
.main-content {
    margin-top: 1rem;
}

/* Filtros y tabla */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: #ffffff;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.field-group {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1;
}
.field-group label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #555;
}
.field-group input {
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}
.field-group.buttons {
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.5rem;
}
.btn-primary,
.btn-secondary,
.btn-danger {
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-primary {
    background-color: #0057b7;
    color: #fff;
}
.btn-secondary {
    background-color: #e2e8f0;
    color: #1e293b;
}
.btn-danger {
    background-color: #d32f2f;
    color: #fff;
}
.table-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-top: 1.5rem;
}
.table-header {
    padding: 0.75rem 1.2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(90deg, #0057b7, #1583d8);
    color: #fff;
}
.table-wrapper {
    overflow-x: auto;
}
.ventas-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
.ventas-table th,
.ventas-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}
.ventas-table thead {
    background-color: #e3f2fd;
}
.no-data {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}
.actions-section {
    text-align: right;
    margin-top: 1rem;
}
.footer {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 2rem;
}

/* Desktop: menú siempre abierto */
@media (min-width: 992px) {
    .layout {
        padding-left: 280px;
    }
    .menu-toggle {
        display: none;
    }
    .sidebar {
        transform: translateX(0);
    }
    .topbar {
        margin-top: 1rem;
        text-align: left;
    }
}


.toast {
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    color: white;
    text-align: center;
    font-size: 16px;
    width: 100%;
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

/* Estilo para los formularios */
.form-card {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.toast {
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    color: white;
    text-align: center;
    font-size: 16px;
    width: 100%;
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fc;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding-top: 20px;
    position: fixed; /* Barra lateral fija */
    height: 100vh;
}

.sidebar .logo {
    width: 100px;
    margin-bottom: 10px;
    text-align: center;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
}

.sidebar-menu li {
    padding: 15px;
    text-align: center;
}

.sidebar-menu li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.sidebar-menu li:hover {
    background-color: #34495e;
}

.dashboard-content {
    margin-left: 250px; /* Esto asegura que el contenido no se superponga con la barra lateral */
    padding: 20px;
    flex-grow: 1;
    background-color: #fff;
}

.filters form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filters input {
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.filters button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
}

.dashboard-table table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dashboard-table th, .dashboard-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.dashboard-table th {
    background-color: #2c3e50;
    color: white;
}

.dashboard-table td {
    background-color: #fff;
}

.dashboard-table a {
    color: #3498db;
    text-decoration: none;
}

.dashboard-table a:hover {
    text-decoration: underline;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    padding: 5px 15px;
    margin: 0 5px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.pagination a:hover {
    background-color: #2980b9;
}

/* Ajustes para asegurarse de que el contenido no se sobreponga */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
    }

    .dashboard-content {
        margin-left: 0;
    }
}


body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fc;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50; /* Azul oscuro */
    color: white;
    padding: 20px 10px;
    position: fixed;
    height: 100%;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

.sidebar .logo {
    width: 100px;
    margin: 0 auto;
    display: block;
    margin-bottom: 20px;
}

.sidebar h3 {
    text-align: center;
    margin: 10px 0;
    font-size: 20px;
    color: white;
    font-weight: 600;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
}

.sidebar-menu li {
    padding: 15px;
    text-align: left;
    font-size: 18px;
    border-bottom: 1px solid #34495e; /* Línea sutil entre elementos */
}

.sidebar-menu li a {
    color: white;
    text-decoration: none;
    display: block;
}

.sidebar-menu li a:hover {
    background-color: #2980b9; /* Color de hover */
    padding-left: 10px; /* Efecto de desplazamiento al pasar el cursor */
    transition: all 0.3s;
}

.sidebar-menu li .icon {
    margin-right: 10px;
}

.dashboard-content {
    margin-left: 250px;
    padding: 20px;
    flex-grow: 1;
    background-color: #fff;
}

.dashboard-header {
    margin-bottom: 20px;
}

.filters form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filters input {
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.filters button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
}

.dashboard-table table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dashboard-table th, .dashboard-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.dashboard-table th {
    background-color: #2c3e50;
    color: white;
}

.dashboard-table td {
    background-color: #fff;
}

.dashboard-table a {
    color: #3498db;
    text-decoration: none;
}

.dashboard-table a:hover {
    text-decoration: underline;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    padding: 5px 15px;
    margin: 0 5px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.pagination a:hover {
    background-color: #2980b9;
}

/* Responsividad */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
    }

    .dashboard-content {
        margin-left: 0;
    }
}


/* ===== Helpers (panel/cards/buttons/tables) ===== */
.panel { padding: 8px 0; }
.panel-header h1 { margin: 0 0 6px; }
.panel-header p { margin: 0 0 14px; opacity: .85; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (max-width: 900px){ .grid-2 { grid-template-columns: 1fr; } }

.card { background:#fff; border-radius: 14px; padding: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.06); }
.card h3 { margin: 0 0 10px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(0,0,0,.10);
  background: #f3f6ff; text-decoration:none; cursor:pointer; font-weight:600;
}
.btn.primary{ background:#0057b7; color:#fff; border-color:#0057b7; }
.btn:hover{ filter: brightness(.98); }

.alert { padding: 10px 12px; border-radius: 12px; margin: 10px 0; border: 1px solid rgba(0,0,0,.08); }
.alert.success{ background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.25); }
.alert.danger{ background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); }

.table-wrap{ overflow:auto; }
.table{ width:100%; border-collapse: collapse; }
.table th, .table td{ padding: 10px; border-bottom: 1px solid rgba(0,0,0,.06); text-align:left; vertical-align:top; }

/* Footer fijo base (desktop) */
.page-footer{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;

  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;

  background: #ffffff;
  color: #1f2a44;

  border-top: 1px solid rgba(0,0,0,.08);
  z-index: 999;
}

/* Evita que tape contenido */
.app-main{
  padding-bottom: 56px; /* ajuste para footer fijo */
}

/* vil: estilo moderno (pill / glass) */
@media (max-width: 720px){
  .page-footer{
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    bottom: 10px;

    border: 1px solid rgba(0,0,0,.10);
    border-top: 1px solid rgba(0,0,0,.10);

    border-radius: 999px;

    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;

    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 12px 30px rgba(0,0,0,.14);
  }

  .app-main{
    padding-bottom: 78px; /* más espacio en móvil por el pill */
  }
}
