* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a2f3d;
    min-height: 100vh;
    color: #fff;
}

/* Notification */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #4CAF50;
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification.show {
    opacity: 1;
}

/* Header */
.header {
    background: #1a2f3d;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-left, .header-center, .header-right {
    display: flex;
    align-items: center;
}
.header-left { flex: 1; }
.header-center { flex: 1; justify-content: center; }
.header-right { flex: 1; justify-content: flex-end; }
.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: #fff;
}

.logo-text {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-home-btn {
    background: #1a2f3d;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    box-shadow: none;
}
.header-home-btn:hover {
    background: #1a2f3d;
}
.header-home-btn:focus {
    outline: 2px solid #4a6878;
    outline-offset: 2px;
}

.user-badge {
    background: #3a5d73;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: #2d4a5c;
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #3a5d73;
}
.nav-btn.active {
  background: #3a5d73;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.settings-btn {
    background: transparent;
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s;
}

.settings-btn:hover {
    background: #2d4a5c;
}

/* Main Content */
.main-content {
    padding: 40px 24px 100px 24px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: #3d5a6b;
    border-radius: 12px;
    padding: 32px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: #4a6878;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #fff;
    text-align: center;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
}

.card-badge.lightning {
    color: #f5a623;
}

.card-badge.menu {
    color: #fff;
}

/* Footer */
.footer {
    background: #1a2f3d;
    padding: 16px 24px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
    z-index: 100;
}

/* Sales Interface */
.sales-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
    padding: 20px;
}

.sales-left {
    flex: 2;
    background: #2a4a5c;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sales-right {
    flex: 1;
    background: #2a4a5c;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sales-header {
    margin-bottom: 20px;
}

.sales-header h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
}

.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input, .filter-select {
    padding: 8px 12px;
    border: 1px solid #4a6a7c;
    border-radius: 4px;
    background: #1a2f3d;
    color: #fff;
    font-size: 14px;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 150px;
}

.products-list {
    flex: 1;
    overflow-y: auto;
    display: block;
    padding-right: 10px;
}

/* Linhas de produtos (sem cards) */
.product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 6px;
    border-bottom: 1px solid #4a6a7c;
}
.product-row:last-child { border-bottom: none; }
.product-info { display: flex; gap: 12px; align-items: center; }
.product-name { color: #fff; font-weight: 600; }
.product-price { color: #5a9fd4; }
.product-stock { color: #8a9ba8; }
.product-actions { display: flex; align-items: center; }
.add-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background: #5a9fd4;
    color: #fff;
    cursor: pointer;
}
.add-btn:hover { opacity: 0.9; }
.product-card {
    background: #1a2f3d;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #4a6a7c;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card:hover {
    border-color: #5a9fd4;
    transform: translateY(-2px);
}

.product-card h4 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 14px;
}

.product-card .price {
    color: #5a9fd4;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.product-card .stock {
    color: #8a9ba8;
    font-size: 12px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-header h3 {
    color: #fff;
    font-size: 18px;
}

.clear-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.clear-btn:hover {
    background: #b71c1c;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    background: #1a2f3d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #4a6a7c;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-item h4 {
    color: #fff;
    font-size: 14px;
}

.remove-item {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.cart-item-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cart-item-controls label {
    color: #8a9ba8;
    font-size: 12px;
}

.cart-item-controls input {
    padding: 4px 8px;
    border: 1px solid #4a6a7c;
    border-radius: 4px;
    background: #2a4a5c;
    color: #fff;
    width: 80px;
    font-size: 12px;
}

.cart-summary {
    border-top: 1px solid #4a6a7c;
    padding-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #fff;
}

.summary-row.total {
    font-weight: bold;
    font-size: 18px;
    color: #5a9fd4;
    border-top: 1px solid #4a6a7c;
    padding-top: 10px;
    margin-top: 10px;
}

.discount-input {
    padding: 4px 8px;
    border: 1px solid #4a6a7c;
    border-radius: 4px;
    background: #2a4a5c;
    color: #fff;
    width: 80px;
    text-align: right;
}

.finalize-btn {
    width: 100%;
    background: #4caf50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 15px;
}

.finalize-btn:hover {
    background: #45a049;
}

.finalize-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Sale Modal */
.sale-type-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.sale-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #4a6a7c;
    border-radius: 6px;
    background: #2a4a5c;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.sale-type-btn:hover {
    border-color: #5a9fd4;
}

.sale-type-btn.active {
    border-color: #5a9fd4;
    background: #5a9fd4;
    color: #fff;
}

.sale-type-btn.venda.active {
    background: #4caf50;
    border-color: #4caf50;
}

.sale-type-btn.pedido.active {
    background: #ff9800;
    border-color: #ff9800;
}

.sale-type-btn.orcamento.active {
    background: #2196f3;
    border-color: #2196f3;
}

/* History */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
}

.history-header h3 {
    color: #fff;
    font-size: 24px;
}

.history-filters {
    display: flex;
    gap: 10px;
}

.sales-history {
    padding: 0 20px 20px;
}

/* History table */
.history-table {
    width: 100%;
    border-collapse: collapse;
}
.history-table thead th {
    text-align: left;
    color: #cdd7e0;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid #4a6a7c;
    background: #1a2f3d;
}
.history-table tbody tr.type-venda td { color: #4caf50; }
.history-table tbody tr.type-pedido td { color: #2196f3; }
.history-table tbody tr.type-orcamento td { color: #ff9800; }
.history-table tbody td {
    color: #cdd7e0;
    padding: 10px 12px;
    border-bottom: 1px solid #263a4b;
}
.history-table tbody tr:hover {
    background: #203948;
}

.icon-btn {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
}
.icon-btn:hover { filter: brightness(1.2); }

.sale-group {
    background: #2a4a5c;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.sale-group-header {
    background: #1a2f3d;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.sale-group-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.sale-type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.sale-type-badge.venda {
    background: #4caf50;
    color: white;
}

.sale-type-badge.pedido {
    background: #ff9800;
    color: white;
}

.sale-type-badge.orcamento {
    background: #2196f3;
    color: white;
}

.sale-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.sale-status-badge.aberto {
    background: #ff5722;
    color: white;
}

.sale-status-badge.pago {
    background: #4caf50;
    color: white;
}

.sale-status-badge.cancelado {
    background: #9e9e9e;
    color: white;
}

.sale-group-actions {
    display: flex;
    gap: 10px;
}

.sale-group-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.edit-sale-btn {
    background: #2196f3;
    color: white;
}

.delete-sale-btn {
    background: #d32f2f;
    color: white;
}

.sale-group-items {
    padding: 15px 20px;
    border-top: 1px solid #4a6a7c;
    display: none;
}

.sale-group.expanded .sale-group-items {
    display: block;
}

.sale-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #4a6a7c;
}

.sale-item:last-child {
    border-bottom: none;
}

.sale-item-info {
    color: #fff;
}

.sale-item-price {
    color: #5a9fd4;
    font-weight: bold;
}

.footer-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s;
}

.footer-btn:hover {
    background: #2d4a5c;
}

.support-btn {
    background: #3a5d73;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.support-btn:hover {
    background: #2d4a5c;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #2d4a5c;
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
 }
 .modal.wide { max-width: 960px; }

.modal-content {
    font-size: 15px;
    color: #e0e9ef;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

@media (max-width: 640px) {
    .modal { padding: 24px; max-width: 95%; }
    .modal-content { grid-template-columns: 1fr; }
}
.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}

.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: #b0c4d0;
}

.modal-content {
    font-size: 15px;
    color: #e0e9ef;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #f5a623 0%, #f7b731 100%);
    color: #fff;
}

.modal-btn.secondary {
    background: #3a5d73;
    border: 2px solid #f5a623;
    color: #fff;
}

.modal-btn:hover {
    transform: scale(1.02);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #3a5d73;
    border-radius: 8px;
    background: #1e3c4f;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #f5a623;
}

.form-input::placeholder {
    color: #7a93a5;
}

.login-btn {
    width: calc(50% - 6px);
    padding: 14px;
    background: linear-gradient(135deg, #f5a623 0%, #f7b731 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 24px;
}

.register-btn {
    width: calc(50% - 6px);
    padding: 14px;
    background: #3a5d73;
    border: 2px solid #f5a623;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 24px;
}

.register-btn:hover {
    background: #2d4a5c;
    transform: scale(1.02);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.login-btn:hover {
    transform: scale(1.02);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #b0c4d0;
}

.form-link {
    color: #f5a623;
    text-decoration: none;
    font-weight: 500;
}

.form-link:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

.blurred {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

.admin-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #e74c3c;
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    z-index: 2001;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    transition: all 0.3s;
}

.admin-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .card {
        padding: 24px;
    }

    .card-icon {
        font-size: 36px;
    }

    .card-title {
        font-size: 14px;
    }
}

.message {
  min-height: 20px;
  font-size: 13px;
  margin-top: 8px;
  color: #f5a623;
}
.message.error { color: #ff6b6b; }
.message.success { color: #2ecc71; }
.user-panel {
  background: #2d4a5c;
  border: 1px solid #3a5d73;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logout-btn {
  background: #3a5d73;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.3s;
}
.logout-btn { background: transparent; border: 1px solid #4a6878; color: #fff; }
.logout-btn:hover { background: #2d4a5c; }
.settings-block { margin-top: 12px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.settings-panel {
  background: #3d5a6b;
  border: 1px solid #4a6878;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
ul.nav-menu { list-style: none; padding: 0; margin: 0; }
ul.nav-menu li { display: inline-block; }
.cad-subnav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cad-tabs { display: flex; gap: 8px; }
.subnav-btn { background: #304b5a; color: #fff; border: 1px solid #4a6878; border-radius: 20px; padding: 6px 12px; cursor: pointer; }
.subnav-btn.active { background: #3a5d73; }
.cad-actions { display: flex; }
.primary-btn { background: #3a5d73; border: 1px solid #4a6878; color: #fff; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.cad-list { background: #263845; border: 1px solid #3a4f5d; border-radius: 12px; padding: 8px; }
.cad-table { width: 100%; border-collapse: collapse; }
.cad-table th, .cad-table td { padding: 8px 10px; border-bottom: 1px solid #3a4f5d; }
.cad-table th { text-align: left; color: #bcd; }
.modal.small { max-width: 520px; }
.entity-form .form-group { margin-bottom: 8px; }
ul.nav-menu { list-style: none; padding: 0; margin: 0; }
ul.nav-menu li { display: inline-block; }
.cad-panel { margin-top: 12px; }
.cad-entity-label { color: #cfe3ef; }
ul.nav-menu { list-style: none; padding: 0; margin: 0; }
ul.nav-menu li { display: inline-block; }
.period-buttons { display: flex; gap: 8px; align-items: center; }
.filter-btn { background: #2d4a5c; color: #e0e9ef; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.filter-btn:hover { background: #3a5d73; }
.filter-btn.active { background: #5a9fd4; color: #fff; }
.filter-btn.secondary { background: #3a5d73; }
.filter-btn.secondary:hover { background: #3a5d73; }
.filter-btn.secondary.active { background: #5a9fd4; color: #fff; }

/* Recibos table styles */
.receipts-table { width: 100%; border-collapse: collapse; }
.receipts-table th, .receipts-table td { border-bottom: 1px solid #3a5d73; padding: 8px; }
.receipts-table thead th { background: #213b4c; color: #e0e9ef; }
.print-btn { background: #16a34a; color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.print-btn:hover { background: #148a3f; }
.pdf-btn { background: #3b82f6; color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; margin-left: 6px; }
.pdf-btn:hover { background: #336bd6; }
.entity-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .entity-form { grid-template-columns: 1fr; }
}
.entity-form .form-row.full-row { grid-column: 1 / -1; }
.entity-form .form-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 12px;
  background: #263a4b;
  border: 1px solid #3a5d73;
  border-radius: 10px;
  padding: 10px 12px;
}
.entity-form .form-row .form-label {
  color: #cfe3ef;
  font-weight: 500;
}
.entity-form .form-row .form-input,
.entity-form .form-row input,
.entity-form .form-row select,
.entity-form .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #3a5d73;
  border-radius: 8px;
  background: #1e3c4f;
  color: #fff;
  font-size: 14px;
}
.entity-form .form-row .form-input:focus,
.entity-form .form-row input:focus,
.entity-form .form-row select:focus,
.entity-form .form-row textarea:focus {
  outline: none;
  border-color: #f5a623;
}
.entity-form .form-row input[type="file"] {
  padding: 8px;
  background: #1e3c4f;
  border: 2px dashed #3a5d73;
}
.entity-form .form-row img#empLogoPreview {
  background: #1a2f3d;
  border: 1px solid #3a5d73;
}
.entity-form .form-row label.form-label input[type="checkbox"] {
  transform: translateY(1px);
  margin-right: 8px;
}
.modal-btn.primary {
    background: linear-gradient(135deg, #f5a623 0%, #f7b731 100%);
    color: #fff;
}

.modal-btn.secondary {
    background: #3a5d73;
    border: 2px solid #f5a623;
    color: #fff;
}

.modal-btn:hover {
    transform: scale(1.02);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #3a5d73;
    border-radius: 8px;
    background: #1e3c4f;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #f5a623;
}

.form-input::placeholder {
    color: #7a93a5;
}

.login-btn {
    width: calc(50% - 6px);
    padding: 14px;
    background: linear-gradient(135deg, #f5a623 0%, #f7b731 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 24px;
}

.register-btn {
    width: calc(50% - 6px);
    padding: 14px;
    background: #3a5d73;
    border: 2px solid #f5a623;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 24px;
}

.register-btn:hover {
    background: #2d4a5c;
    transform: scale(1.02);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.login-btn:hover {
    transform: scale(1.02);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #b0c4d0;
}

.form-link {
    color: #f5a623;
    text-decoration: none;
    font-weight: 500;
}

.form-link:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

.blurred {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

.admin-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #e74c3c;
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    z-index: 2001;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    transition: all 0.3s;
}

.admin-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .card {
        padding: 24px;
    }

    .card-icon {
        font-size: 36px;
    }

    .card-title {
        font-size: 14px;
    }
}

.message {
  min-height: 20px;
  font-size: 13px;
  margin-top: 8px;
  color: #f5a623;
}
.message.error { color: #ff6b6b; }
.message.success { color: #2ecc71; }
.user-panel {
  background: #2d4a5c;
  border: 1px solid #3a5d73;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logout-btn {
  background: #3a5d73;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.3s;
}
.logout-btn { background: transparent; border: 1px solid #4a6878; color: #fff; }
.logout-btn:hover { background: #2d4a5c; }
.settings-block { margin-top: 12px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.settings-panel {
  background: #3d5a6b;
  border: 1px solid #4a6878;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
ul.nav-menu { list-style: none; padding: 0; margin: 0; }
ul.nav-menu li { display: inline-block; }
.cad-subnav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cad-tabs { display: flex; gap: 8px; }
.subnav-btn { background: #304b5a; color: #fff; border: 1px solid #4a6878; border-radius: 20px; padding: 6px 12px; cursor: pointer; }
.subnav-btn.active { background: #3a5d73; }
.cad-actions { display: flex; }
.primary-btn { background: #3a5d73; border: 1px solid #4a6878; color: #fff; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.cad-list { background: #263845; border: 1px solid #3a4f5d; border-radius: 12px; padding: 8px; }
.cad-table { width: 100%; border-collapse: collapse; }
.cad-table th, .cad-table td { padding: 8px 10px; border-bottom: 1px solid #3a4f5d; }
.cad-table th { text-align: left; color: #bcd; }
.modal.small { max-width: 520px; }
.entity-form .form-group { margin-bottom: 8px; }
ul.nav-menu { list-style: none; padding: 0; margin: 0; }
ul.nav-menu li { display: inline-block; }
.cad-panel { margin-top: 12px; }
.cad-entity-label { color: #cfe3ef; }
ul.nav-menu { list-style: none; padding: 0; margin: 0; }
ul.nav-menu li { display: inline-block; }
.period-buttons { display: flex; gap: 8px; align-items: center; }
.filter-btn { background: #2d4a5c; color: #e0e9ef; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.filter-btn:hover { background: #3a5d73; }
.filter-btn.active { background: #5a9fd4; color: #fff; }
.filter-btn.secondary { background: #3a5d73; }
.filter-btn.secondary:hover { background: #3a5d73; }
.filter-btn.secondary.active { background: #5a9fd4; color: #fff; }

/* Recibos table styles */
.receipts-table { width: 100%; border-collapse: collapse; }
.receipts-table th, .receipts-table td { border-bottom: 1px solid #3a5d73; padding: 8px; }
.receipts-table thead th { background: #213b4c; color: #e0e9ef; }
.print-btn { background: #16a34a; color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.print-btn:hover { background: #148a3f; }
.pdf-btn { background: #3b82f6; color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; margin-left: 6px; }
.pdf-btn:hover { background: #336bd6; }