/* ============================================================
   CECCATO BASE — variables, reset, layout, sidebar, nav,
   botones, formularios, modal, paginación
   ============================================================ */

/* ── Variables ── */
:root {
    --ceccato-primary:        #2176AE;
    --ceccato-primary-dark:   #1A5C8A;
    --ceccato-primary-light:  #EBF5FF;
    --ceccato-primary-hover:  #1C6A9E;
    --ceccato-danger:         #DC2626;
    --ceccato-danger-light:   #FEE2E2;
    --ceccato-success:        #0D9488;
    --ceccato-success-light:  #CCFBF1;
    --ceccato-text:           #1F2937;
    --ceccato-text-muted:     #6B7280;
    --ceccato-text-light:     #9CA3AF;
    --ceccato-border:         #E5E7EB;
    --ceccato-border-focus:   #2176AE;
    --ceccato-bg:             #F3F4F6;
    --ceccato-white:          #FFFFFF;
    --ceccato-shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --ceccato-shadow:         0 4px 12px rgba(0,0,0,0.08);
    --ceccato-radius:         10px;
    --ceccato-radius-sm:      6px;
    --ceccato-radius-lg:      16px;
    --ceccato-sidebar-width:  230px;
    --ceccato-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--ceccato-font);
  background: var(--ceccato-bg);
  color: var(--ceccato-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
.ceccato-account-wrapper a   { color: var(--ceccato-primary); text-decoration: none; }
.ceccato-account-wrapper a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Outer wrapper ── */
.ceccato-account-wrapper {
  background: var(--ceccato-bg);
  min-height: 100vh;
  padding: 30px 0 50px;
}

/* ── Main container (sidebar + content) ── */
.ceccato-account-container {
  max-width: 1340px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
.ceccato-sidebar {
  width: var(--ceccato-sidebar-width);
  flex-shrink: 0;
  background: var(--ceccato-white);
  border-radius: var(--ceccato-radius);
  box-shadow: var(--ceccato-shadow-sm);
  padding: 20px 0;
  position: sticky;
  top: 24px;
}

.ceccato-sidebar-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ceccato-text-light);
  padding: 0 20px 10px;
}

/* ── Sidebar Nav ── */
.ceccato-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.ceccato-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ceccato-text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
  line-height: 1.2;
}

.ceccato-sidebar-nav a:hover {
  background: var(--ceccato-primary-light);
  color: var(--ceccato-primary);
  text-decoration: none;
}

.ceccato-sidebar-nav a.ceccato-nav-active {
  color: var(--ceccato-primary);
  font-weight: 600;
  background: var(--ceccato-primary-light);
  border-left-color: var(--ceccato-primary);
}

.ceccato-sidebar-nav .ceccato-nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}

/* ── Sidebar divider ── */
.ceccato-sidebar-divider {
  height: 1px;
  background: var(--ceccato-border);
  margin: 10px 20px;
}

/* ── Logout link ── */
.ceccato-sidebar-logout {
  padding: 0 0 4px;
}
.ceccato-sidebar-logout a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  color: var(--ceccato-text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
}
.ceccato-sidebar-logout a:hover {
  color: var(--ceccato-danger);
  background: var(--ceccato-danger-light);
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT PANEL
   ═══════════════════════════════════════════ */
.ceccato-main-content {
  flex: 1;
  min-width: 0;
  background: var(--ceccato-white);
  border-radius: var(--ceccato-radius);
  box-shadow: var(--ceccato-shadow-sm);
  padding: 28px 32px;
}

.ceccato-page-title {
  color: var(--ceccato-text);
  margin-bottom: 24px;
  font-size: var(--e-global-typography-ba4bbcd-font-size) !important;
  font-weight: 600;
}

/* ── Section headings inside content ── */
.ceccato-section-heading {
  font-size: var(--e-global-typography-ba4bbcd-font-size);
  font-weight: 600;
  color: var(--ceccato-text);
  margin-bottom: 12px !important;
  margin-top: 24px;
}
.ceccato-section-heading:first-child { margin-top: 0; }

/* ═══════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════ */
.ceccato-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.ceccato-form-label {
  font-size: var(--e-global-typography-996197c-font-size) !important;
  font-weight: 500;
  color: var(--ceccato-text-muted);
}

.ceccato-form-input,
.ceccato-form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ceccato-border);
  border-radius: var(--ceccato-radius);
  font-size: 14px;
  color: var(--ceccato-text);
  background: var(--ceccato-white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.ceccato-form-input::placeholder { color: var(--ceccato-text-light); }

.ceccato-form-input:focus,
.ceccato-form-select:focus {
  border-color: var(--ceccato-border-focus);
  box-shadow: 0 0 0 3px rgba(33,118,174,0.12);
}

/* Select wrapper (for custom arrow) */
.ceccato-select-wrap {
  position: relative;
}
.ceccato-select-wrap .ceccato-form-select {
  padding-right: 36px;
  cursor: pointer;
}
.ceccato-select-wrap::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 50%;
  /*transform: translateY(-50%);*/
  /*width: 0;*/
  /*height: 0;*/
  /*border-left: 5px solid transparent;*/
  /*border-right: 5px solid transparent;*/
  /*border-top: 6px solid var(--ceccato-text-muted);*/
  
  border-bottom: 2px solid var(--ceccato-text-muted);
    border-left: 2px solid var(--ceccato-text-muted);
    /*background-color: red;*/
    height: 8px;
    width: 8px;
    transform: rotate(-45deg) translateY(-75%);
}

/* Input with icon (e.g. password eye) */
.ceccato-input-wrap {
  position: relative;
}
.ceccato-input-wrap .ceccato-form-input { padding-right: 44px; }
.ceccato-input-icon-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
  color: var(--ceccato-text-muted);
  cursor: pointer;
}
.ceccato-input-icon-btn:hover { color: var(--ceccato-primary); }

/* Checkbox */
.ceccato-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  cursor: pointer;
}
.ceccato-checkbox-wrap input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--ceccato-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.ceccato-checkbox-label {
  font-size: 13px;
  color: var(--ceccato-text);
  cursor: pointer;
}

/* Two-column grid form */
.ceccato-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

input:focus{
    outline: none !important;
    border-color:var(--e-global-color-f055890) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.ceccato-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px !important;
  background: var(--ceccato-primary);
  color: var(--ceccato-white);
  border: 1px solid currentColor !important;
  border-radius: var(--ceccato-radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.ceccato-btn-primary:hover {
  /*background: var(--celeste) !important;*/
  /*border-color:  var(--celeste) !important;*/
  color: var(--ceccato-white);
}
.ceccato-btn-primary:active {
  transform: translateY(1px);
}

.ceccato-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  background-color: transparent !important;
  color: var(--ceccato-primary) !important;
  border: 1.5px solid var(--ceccato-primary);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}
.ceccato-btn-outline:hover {
  background-color: transparent !important;
  border-color: var(--celeste) !important;
  /*text-decoration: none;*/
  color: var(--ceccato-white) !important;
}

.ceccato-btn-danger-icon {
  background: none;
  border: none;
  padding: 7px;
  border-radius: var(--ceccato-radius-sm);
  color: var(--ceccato-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
}
.ceccato-btn-danger-icon:hover {
  color: var(--ceccato-danger);
  background: var(--ceccato-danger-light);
}

.ceccato-btn-sm {
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-size: 12px !important;
  text-align: center;
  border-radius: 50px;
}

.btn-efecto{
    display: flex !important;
    justify-content: center;
    align-items: center;
}
/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.ceccato-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ceccato-border);
}
.ceccato-pagination-info {
  font-size: 13px;
  color: var(--ceccato-text-muted);
}
.ceccato-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ceccato-pagination button,
.ceccato-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--ceccato-border);
  background: var(--ceccato-white);
  color: var(--ceccato-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ceccato-pagination button:hover {
  border-color: var(--ceccato-primary);
  color: var(--ceccato-primary);
}
.ceccato-pagination .ceccato-page-active {
  background: var(--ceccato-primary);
  border-color: var(--ceccato-primary);
  color: var(--ceccato-white);
  cursor: default;
}
.ceccato-pagination .ceccato-page-dots {
  border: none;
  background: none;
  cursor: default;
  color: var(--ceccato-text-muted);
  width: auto;
}
.ceccato-pagination .ceccato-page-arrow {
  border-color: var(--ceccato-primary);
  color: var(--ceccato-primary);
}
.ceccato-pagination .ceccato-page-arrow:disabled,
.ceccato-pagination .ceccato-page-arrow[disabled] {
  border-color: var(--ceccato-border);
  color: var(--ceccato-text-light);
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════
   BADGE / STATUS
   ═══════════════════════════════════════════ */
.ceccato-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ceccato-badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.ceccato-badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.ceccato-badge-info {
  background-color: #dbeafe;
  color: #0c4a6e;
}

.ceccato-badge-danger {
  background-color: #fee2e2;
  color: #7f1d1d;
}

.ceccato-badge-default {
  background-color: #e5e7eb;
  color: #374151;
}

/* ═══════════════════════════════════════════
   FILTER BAR (top of tables)
   ═══════════════════════════════════════════ */
.ceccato-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ceccato-filter-select-wrap {
  position: relative;
  min-width: 160px;
}
.ceccato-filter-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--ceccato-border);
  border-radius: var(--ceccato-radius-sm);
  font-size: 13px;
  color: var(--ceccato-text);
  background: var(--ceccato-white);
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.ceccato-filter-select:focus { border-color: var(--ceccato-border-focus); }
.ceccato-filter-select-wrap::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ceccato-text-muted);
}

/* ═══════════════════════════════════════════
   CONTEXT MENU (dropdown)
   ═══════════════════════════════════════════ */
.ceccato-context-wrap {
  position: relative;
}
.ceccato-context-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: var(--ceccato-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--ceccato-text-muted);
  font-size: 20px;
  line-height: 1;
  transition: background 0.15s;
}
.ceccato-context-btn:hover { background: var(--ceccato-bg); }

.ceccato-context-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--ceccato-white);
  border: 1px solid var(--ceccato-border);
  border-radius: var(--ceccato-radius);
  box-shadow: var(--ceccato-shadow);
  min-width: 170px;
  z-index: 100;
  display: none;
  overflow: hidden;
}
.ceccato-context-menu.ceccato-open { display: block; }

.ceccato-context-menu a,
.ceccato-context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--ceccato-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  border-bottom: 1px solid var(--ceccato-border);
}
.ceccato-context-menu a:last-child,
.ceccato-context-menu button:last-child { border-bottom: none; }
.ceccato-context-menu a:hover,
.ceccato-context-menu button:hover { background: var(--ceccato-bg); }
.ceccato-context-menu .ceccato-context-danger { color: var(--ceccato-danger); }
.ceccato-context-menu .ceccato-context-danger:hover { background: var(--ceccato-danger-light); }

/* ═══════════════════════════════════════════
   MODAL (logout)
   ═══════════════════════════════════════════ */
.ceccato-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99000;
  align-items: center;
  justify-content: center;
}
.ceccato-modal-overlay.ceccato-open {
  display: flex;
}

.ceccato-modal {
  background: var(--ceccato-white);
  border-radius: var(--ceccato-radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 440px;
  margin: 16px;
  overflow: hidden;
  animation: ceccatoModalIn 0.2s ease-out;
}
@keyframes ceccatoModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ceccato-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--ceccato-primary);
  color: var(--ceccato-white);
}
.ceccato-modal-head-title {
  font-size: 15px;
  font-weight: 600;
}
.ceccato-modal-close {
  border: none;
  background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
}
.ceccato-modal-body {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
}

/* Mundo Ceccato logo (text-based for modal) */
.ceccato-modal-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}


.ceccato-modal-body .ceccato-page-title{
    margin-bottom: 0;
}
.ceccato-modal-subtitle {
  font-size: 14px;
  color: var(--ceccato-text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.ceccato-modal-actions {
  display: flex;
  gap: 14px;
    width: 100%;
}
.ceccato-modal-actions .ceccato-btn-outline,
.ceccato-modal-actions .ceccato-btn-primary {
  flex: 1;
  justify-content: center;
}
.ceccato-modal-actions .ceccato-btn-primary {
    border: none !important;
}

/* ═══════════════════════════════════════════
   MOBILE NAV TOGGLE
   ═══════════════════════════════════════════ */
.ceccato-mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 20px;
}

.ceccato-mobile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ceccato-text);
  text-decoration: none;
  font-weight: 500;
}
.ceccato-mobile-back:hover { color: var(--ceccato-primary); text-decoration: none; }
.ceccato-mobile-back svg { width: 16px; height: 16px; }

.ceccato-hamburger {
  background: var(--primario) !important;
  border: none !important;
  border-radius: 3px !important;
  padding: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px !important;
}
.ceccato-hamburger svg{
    height: 20px;
    width: 20px;
}

/* ── Mobile nav overlay ── */
.ceccato-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
}
.ceccato-nav-overlay.ceccato-open { display: block; }

.ceccato-mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(280px, 85vw);
  height: 100%;
  background: var(--ceccato-white);
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  z-index: 501;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.26s ease, visibility 0.26s;
  padding: 20px 0;
  visibility: hidden;
}
.ceccato-mobile-nav-drawer.ceccato-open {
  transform: translateX(0);
  visibility: visible;
}

.ceccato-drawer-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--ceccato-border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ceccato-drawer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ceccato-text-light);
}
.ceccato-drawer-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ceccato-text-muted);
  padding: 2px;
}
.ceccato-drawer-close:hover { color: var(--ceccato-text); }

/* ═══════════════════════════════════════════
   PRODUCT THUMBNAIL (shared across tables)
   ═══════════════════════════════════════════ */
.ceccato-product-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--ceccato-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--ceccato-border);
  overflow: hidden;
  background: var(--ceccato-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   EMPTY STATE (shared across tables)
   ═══════════════════════════════════════════ */
.ceccato-empty-state {
  text-align: center;
  background: white;
}

.ceccato-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  opacity: 1;
}

.ceccato-empty-state h2 {
  margin: 0 0 10px 0;
  font-size: var(--e-global-typography-ba4bbcd-font-size);
  font-weight: 600;
  color: var(--ceccato-text);
}

.ceccato-empty-state p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: var(--ceccato-text-light);
}

.ceccato-empty-btn{
    border-radius: 50px;
    color: var(--ceccato-white) !important;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
/* Pórtatil */
@media (max-width: 1366px) {
    .ceccato-account-container {
      max-width: 90%;
    }
}
/* Mobile*/
@media (max-width: 767px) {
  .ceccato-account-wrapper {
    padding: 16px 0 40px;
  }

  .ceccato-account-container {
    flex-direction: column;
    gap: 0;
  }

  /* Sidebar hidden on mobile */
  .ceccato-sidebar {
    display: none;
    position: static;
    width: 100%;
  }

    .ceccato-main-content{
      width: 100%;
  }

  /* Mobile topbar visible */
  .ceccato-mobile-topbar { display: flex; }

  /* Form row single column on mobile */
  .ceccato-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Table header stack */
  .ceccato-table-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Pagination info hidden on small screens */
  .ceccato-pagination-info {
    display: none;
  }

  /* Modal full-width */
  .ceccato-modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--ceccato-radius-lg) var(--ceccato-radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
  .ceccato-modal-overlay {
    align-items: flex-end;
  }
  @keyframes ceccatoModalIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Full-width button on mobile */
  .ceccato-btn-save-full {
    width: 100%;
  }
}
