/* =========================
   GLOBAL
========================= */
body{
  margin:0;
  font-family:'Segoe UI', Arial, sans-serif;
  background:#f8fafc;
  color:#1f2937;
}

*{
  box-sizing:border-box;
}

/* =========================
   INTRO
========================= */
#intro{
  position:fixed;
  inset:0;
  background:#000;
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.logo img{
  width:50vw;
  max-width:500px;
  opacity:0;
  transform:scale(.2);
  animation:introZoom 2s ease-out forwards;
}

@keyframes introZoom{
  0%{opacity:0;transform:scale(.2);}
  50%{opacity:1;transform:scale(1.15);}
  100%{transform:scale(1);}
}

/* =========================
   NAVBAR
========================= */
.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:15px 30px;
  background:#fff;
  border-bottom:1px solid #eee;
}

.nav-left{display:flex;align-items:center;}

.nav-center{
  display:flex;
  gap:15px;
  justify-content:center;
  flex:1;
}

.nav-right{
  display:flex;
  gap:10px;
}

.nav-logo{
  width:120px;
  filter:brightness(0);
}

.tab{
  padding:12px 20px;
  border-radius:8px;
  background:#ede9fe;
  color:#1f2937;
  text-decoration:none;
  font-weight:500;
  font-size:15px;
  transition:.25s;
}

.tab:hover{
  background:#ddd6fe;
}

.active{
  background:#7c3aed;
  color:#fff;
}

/* =========================
   CONTAINER
========================= */
.container{
  padding:30px;
}

/* =========================
   GLOBAL BUTTON SYSTEM
========================= */

.btn{
height:48px;
min-width:150px;
padding:0 26px;

display:inline-flex;
align-items:center;
justify-content:center;
gap:8px;

appearance:none;
-webkit-appearance:none;

border:none;
outline:none;

border-radius:999px;

font-family:inherit;
font-size:14px;
font-weight:800;
line-height:1;

text-decoration:none;
white-space:nowrap;

cursor:pointer;

transition:
transform .18s ease,
box-shadow .18s ease,
opacity .18s ease;

box-sizing:border-box;
vertical-align:middle;

position:relative;
overflow:hidden;

color:#fff;

flex-shrink:0;
}

/* =====================================
   UNIFIED BUTTON STYLE
===================================== */

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger{
background:
linear-gradient(
135deg,
#a855f7 0%,
#7c3aed 45%,
#4f46e5 100%
);

color:#fff;

box-shadow:
0 10px 22px rgba(124,58,237,.28),
0 4px 10px rgba(79,70,229,.18);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover{
transform:translateY(-2px);

box-shadow:
0 14px 26px rgba(124,58,237,.34),
0 6px 14px rgba(79,70,229,.22);
}

/* DISABLED */
.btn-disabled,
.btn:disabled{
background:
linear-gradient(
135deg,
#d1d5db 0%,
#9ca3af 100%
);

box-shadow:none;

opacity:.75;

cursor:not-allowed;
pointer-events:none;
}

/* SMALL */
.btn-sm{
height:40px;
min-width:110px;
padding:0 18px;
font-size:13px;
}

/* ICON */
.btn-icon{
width:48px;
min-width:48px;
padding:0;
}

/* FULL */
.btn-full{
width:100%;
}

/* =========================
   DASHBOARD PRO
========================= */
.dashboard-layout{
  display:flex;
  gap:25px;
  align-items:flex-start;
}

.dashboard-content{
  flex:1;
  min-width:0;
}

.dash-subtitle{
  color:#6b7280;
  margin-bottom:20px;
}

.dashboard-sidebar{
  width:290px;
  min-width:290px;
  background:#fff;
  border-radius:14px;
  padding:20px;
  box-shadow:0 8px 25px rgba(0,0,0,.06);
  position:sticky;
  top:20px;
}

.dashboard-sidebar h3{
  margin:0 0 12px;
  color:#7c3aed;
  font-size:18px;
}

.dashboard-sidebar hr{
  border:none;
  border-top:1px solid #eee;
  margin:18px 0;
}

.search-input{
  width:100%;
  padding:12px;
  margin-bottom:10px;
  border:1px solid #ddd;
  border-radius:10px;
}

/* =========================
   INFO GRID
========================= */

.top-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:14px;

margin-top:18px;
margin-bottom:18px;

width:100%;
}

.info-card{
background:#fff;
border:1px solid #ececec;
border-radius:16px;
padding:18px;

min-width:0;
}

.info-label{
font-size:12px;
font-weight:800;
color:#6b7280;

margin-bottom:8px;

text-transform:uppercase;
}

.info-value{
font-size:28px;
font-weight:800;
color:#111827;

line-height:1.2;
}

/* KPI */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin:20px 0 25px;
}

.stat-card{
  background:#fff;
  border-radius:14px;
  padding:20px;
  box-shadow:0 8px 20px rgba(0,0,0,.06);
}

.stat-card h3{
  margin:0 0 10px;
  font-size:15px;
  color:#6b7280;
}

.stat-card p{
  margin:0;
  font-size:28px;
  font-weight:700;
  color:#7c3aed;
}

/* Sections */
.section-box{
  background:#fff;
  border-radius:14px;
  padding:20px;
  margin-bottom:22px;
  box-shadow:0 8px 20px rgba(0,0,0,.05);
}

/* =========================
   PAGE CARD
========================= */
.page-card{
  background:#fff;
  border:1px solid #ececec;
  border-radius:18px;
  padding:22px;
  box-shadow:0 10px 30px rgba(0,0,0,.04);
  margin:0 auto 18px auto;
  max-width:1280px;
}

.section-box h2{
  margin:0 0 15px;
  font-size:20px;
  color:#111827;
}

/* Quick actions */
.quick-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:15px;
}

/* =========================
   PAGE HEAD
========================= */
.page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:20px;
  flex-wrap:wrap;
}

.page-head-between{
display:flex;
justify-content:space-between;
align-items:flex-start;
gap:20px;
flex-wrap:wrap;
}

.page-title{
  margin:0;
  font-size:34px;
  font-weight:800;
  color:#7c3aed;
  line-height:1.1;
}

.page-subtitle{
  margin-top:8px;
  font-size:15px;
  color:#6b7280;
}

.page-head-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* =========================
   DASHBOARD HEAD
========================= */
.dash-head{
  margin-bottom:20px;
}

.dash-title{
  margin:0;
  font-size:34px;
  font-weight:900;
  color:#7c3aed;
  line-height:1.1;
}

.dash-subtitle{
  margin-top:8px;
  font-size:15px;
  color:#6b7280;
}

/* =========================
   ITEMS
========================= */
#items{
  margin-top:10px;
}

.item-row{
  display:grid;
  grid-template-columns:55% 15% 20% 36px;
  gap:10px;
  align-items:start;
  background:#f9fafb;
  padding:10px;
  border-radius:8px;
  margin:12px 0;
}

.item-row:hover{
  background:#f3f4f6;
}

.desc-box{
  min-height:72px;
}

.item-row input,
.item-row textarea{
  margin:0;
}

/* remove button */
.remove-btn{
  width:36px;
  height:36px;
  min-width:36px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ef4444;
  color:#fff;
  font-size:14px;
}

.remove-btn:hover{
  background:#dc2626;
}

/* =========================
   SUB ITEM
========================= */
.sub-item-editor{
  grid-template-columns:1fr 36px !important;
  margin-left:30px;
  width:calc(100% - 30px);
}

.sub-text{
  min-height:60px;
  background:#fafafa;
  border-left:4px solid #7c3aed !important;
  padding-left:32px !important;
  background-image:radial-gradient(circle,#7c3aed 2px,transparent 3px);
  background-repeat:no-repeat;
  background-position:12px 18px;
  background-size:10px 10px;
}

/* botón pequeño inline */
.sub-item-btn-inline{
  width:38px;
  height:38px;
  min-width:38px;
  border:none;
  border-radius:8px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  font-size:12px;
  background:#e5e7eb;
  color:#111827;
  justify-self:center;   /* centra dentro de la celda */
  align-self:center;
}

.sub-item-btn-inline:hover{
  background:#d1d5db;
}

/* =========================
   LOCKED ROW
========================= */
.locked-row{
  background:#f3f4f6;
  padding:8px 10px !important;
}

.locked-field{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  pointer-events:none;
  resize:none;
  color:#111827;
  font-weight:500;
  min-height:auto !important;
  height:auto !important;
  padding:4px 0 !important;
  margin:0 !important;
  line-height:1.35;
  overflow:hidden;
}

.locked-row textarea{
  resize:none;
}

/* =========================
   NOTES + TOTAL
========================= */
.form-group{
  margin-top:20px;
}

.form-group label{
  display:block;
  font-weight:600;
  margin-bottom:6px;
}

.notes-box{
  height:120px;
}

.total-box{
  margin-top:18px;
  text-align:right;
}

.total-box h3{
  margin:0;
  color:#7c3aed;
  font-size:24px;
}

/* =========================
   GLOBAL TABLE SYSTEM
========================= */

/* CARD */
.table-card{
  background:#fff;
  border:1px solid #ececec;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.04);
  margin:0 auto 18px auto;
}

/* HEAD */
.table-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:22px 24px;
  border-bottom:1px solid #f1f5f9;
  flex-wrap:wrap;
}

.table-card-title{
  margin:0;
  font-size:20px;
  font-weight:700;
  color:#111827;
}

.table-card-subtitle{
  margin-top:4px;
  font-size:14px;
  color:#6b7280;
}

.table-card-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* SEARCH */
.search-box{
  position:relative;
  width:280px;
  max-width:100%;
}

.search-box input{
  width:100%;
  height:42px;
  padding:0 14px;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#fff;
  font-size:14px;
  outline:none;
}

.search-box input:focus{
  border-color:#7c3aed;
  box-shadow:0 0 0 3px rgba(124,58,237,.12);
}

/* RESPONSIVE WRAP */
.table-responsive{
width:100%;
overflow-x:auto;
overflow-y:hidden;

-webkit-overflow-scrolling:touch;

scrollbar-width:thin;
scrollbar-color:rgba(124,58,237,.35) transparent;
}

.table-responsive::-webkit-scrollbar{
height:8px;
}

.table-responsive::-webkit-scrollbar-track{
background:transparent;
}

.table-responsive::-webkit-scrollbar-thumb{
background:rgba(124,58,237,.28);
border-radius:20px;
}

.table-responsive::-webkit-scrollbar-thumb:hover{
background:rgba(124,58,237,.45);
}

/* TABLE */
.pro-table{
  width:100%;
  table-layout:auto;
  min-width:900px;
  border-collapse:collapse;
}

.col-actions{
min-width:220px;
text-align:center;
}

/* HEAD */
.pro-table thead th{
  background:#f8fafc;
  color:#64748b;
  padding:14px 18px;
  text-align:left;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  border-bottom:1px solid #e5e7eb;
  white-space:nowrap;
}

/* BODY */
.pro-table tbody td{
  padding:16px 18px;
  border-bottom:1px solid #f1f5f9;
  color:#111827;
  font-size:14px;
  vertical-align:middle;
}

/* HOVER */
.pro-table tbody tr:hover{
  background:#f8fafc;
}

/* SUB ROW */
.sub-row td{
  background:#fafafa;
  color:#6b7280;
  font-style:italic;
}

.sub-desc{
  padding-left:30px !important;
  position:relative;
}

.sub-desc::before{
  content:"•";
  position:absolute;
  left:12px;
  color:#7c3aed;
  font-weight:bold;
}

/* =========================
   TABLE COLUMNS
========================= */

.col-xs{
width:80px;
}

.col-sm{
width:120px;
}

.col-md{
width:160px;
}

.col-lg{
width:220px;
}

.col-xl{
width:280px;
}

.col-actions{
width:160px;
text-align:center;
white-space:nowrap;
}

.col-actions-wide{
width:260px;
text-align:center;
white-space:nowrap;
}

.col-date{
width:140px;
white-space:nowrap;
}

.col-status{
width:140px;
white-space:nowrap;
}

.col-money{
width:140px;
white-space:nowrap;
}

.col-code{
width:180px;
white-space:nowrap;
}

.text-center{
text-align:center;
}

.text-right{
text-align:right;
}

.nowrap{
white-space:nowrap;
}

/* EMPTY */
.table-empty{
  padding:60px 20px;
  text-align:center;
  color:#6b7280;
}

/* ACTIONS */
.table-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* =========================
   GLOBAL STATUS SYSTEM
========================= */

.status-badge{
display:inline-flex;
align-items:center;
justify-content:center;

min-height:32px;
padding:6px 14px;

border-radius:999px;

font-size:12px;
font-weight:800;
letter-spacing:.2px;
line-height:1;

border:1px solid transparent;

white-space:nowrap;
}

/* DRAFT */
.status-badge.draft{
background:#f3f4f6;
color:#374151;
border-color:#e5e7eb;
}

/* SENT */
.status-badge.sent{
background:#ede9fe;
color:#7c3aed;
border-color:#ddd6fe;
}

/* VIEWED */
.status-badge.viewed{
background:#dbeafe;
color:#2563eb;
border-color:#bfdbfe;
}

/* APPROVED */
.status-badge.approved{
background:#dcfce7;
color:#15803d;
border-color:#bbf7d0;
}

/* PAID */
.status-badge.paid{
background:#dcfce7;
color:#15803d;
border-color:#bbf7d0;
}

/* REJECTED */
.status-badge.rejected{
background:#fee2e2;
color:#dc2626;
border-color:#fecaca;
}

/* EXPIRED */
.status-badge.expired{
background:#fee2e2;
color:#b91c1c;
border-color:#fecaca;
}

/* PARTIAL */
.status-badge.partial{
background:#fef3c7;
color:#b45309;
border-color:#fde68a;
}

/* PENDING */
.status-badge.pending{
background:#fef3c7;
color:#b45309;
border-color:#fde68a;
}

/* SIGNED */
.status-badge.signed{
background:#dcfce7;
color:#15803d;
border-color:#bbf7d0;
}

/* REVISION */
.status-badge.revision-required{
background:#ffedd5;
color:#ea580c;
border-color:#fed7aa;
}

/* UNPAID */
.status-badge.unpaid{
background:#fef3c7;
color:#b45309;
border-color:#fde68a;
}

/* SIGN PENDING */
.status-badge.sign-pending{
background:#fef3c7;
color:#b45309;
border-color:#fde68a;
}

/* =========================
   PAYMENT TOTAL COLORS
========================= */

.status-paid{
color:#16a34a;
font-weight:700;
}

.status-unpaid{
color:#dc2626;
font-weight:700;
}

/* =========================
   ACTION BUTTONS
========================= */
.actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}

.mini-btn{
  position:relative;
  border:1px solid #e5e7eb;
  width:36px;
  height:36px;
  border-radius:10px;
  background:#f1f5f9;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:.15s ease;
  text-decoration:none;
  padding:0;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  flex-shrink:0;
}

.mini-btn svg{
  width:18px;
  height:18px;
  stroke:#374151;
  stroke-width:2;
  fill:none;
}

.mini-btn:hover{
  background:#e9d5ff;
  transform:translateY(-1px);
}

.mini-btn::after{
  content:attr(data-tip);
  position:absolute;
  bottom:115%;
  left:50%;
  transform:translateX(-50%);
  background:#111827;
  color:#fff;
  font-size:11px;
  padding:6px 8px;
  border-radius:8px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:.15s ease;
}

.mini-btn:hover::after{
  opacity:1;
}

/* LOCKED */
.mini-btn-locked{
  opacity:.55;
  cursor:not-allowed;
  background:#e5e7eb;
}

/* DANGER */
.mini-btn-danger{
  background:#fee2e2;
  border-color:#fecaca;
}

.mini-btn-danger svg{
  stroke:#dc2626;
}

.mini-btn-danger:hover{
  background:#fecaca;
}

/* DANGER LOCKED */
.mini-btn-danger-locked{
  background:#fee2e2;
  border-color:#fecaca;
  opacity:.55;
  cursor:not-allowed;
}

.mini-btn-danger-locked svg{
  stroke:#dc2626;
}

.mini-btn-danger-locked:hover{
  transform:none;
  background:#fee2e2;
}

/* SUCCESS */
.mini-btn-success{
  background:#dcfce7;
  border-color:#bbf7d0;
}

.mini-btn-success svg{
  stroke:#15803d;
}

/* WARNING */
.mini-btn-warning{
  background:#fef3c7;
  border-color:#fde68a;
}

.mini-btn-warning svg{
  stroke:#d97706;
}

/* PURPLE */
.mini-btn-purple{
  background:#ede9fe;
  border-color:#ddd6fe;
}

.mini-btn-purple svg{
  stroke:#7c3aed;
}

/* =========================
   DETAIL VIEW SYSTEM
========================= */

.detail-shell{
max-width:1280px;
margin:0 auto;
padding:18px;
}

.detail-top{
background:#fff;
border:1px solid #ececec;
border-radius:20px;
padding:18px 22px;
box-shadow:0 10px 30px rgba(0,0,0,.04);
margin-bottom:18px;

display:flex;
justify-content:space-between;
align-items:center;
gap:18px;
flex-wrap:wrap;
}

.detail-head{
display:flex;
flex-direction:column;
gap:6px;
}

.detail-title{
margin:0;
font-size:30px;
font-weight:900;
color:#7c3aed;
line-height:1;
}

.detail-subtitle{
font-size:14px;
color:#6b7280;
}

.detail-actions{
display:flex;
gap:8px;
flex-wrap:wrap;
justify-content:flex-end;
align-items:center;
}

.detail-doc{
overflow:auto;
}

@media(max-width:768px){

.detail-actions{
width:100%;
justify-content:stretch;
flex-direction:column;
}

}

/* DETAIL SECTIONS */

.detail-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
}

.detail-section{
background:#f8fafc;
border:1px solid #eef2f7;
border-radius:16px;
padding:18px;
display:flex;
flex-direction:column;
gap:14px;
}

.detail-section h3{
margin:0;
margin-bottom:4px;
font-size:20px;
color:#111827;
}

.detail-meta{
display:flex;
flex-direction:column;
gap:14px;
}

.detail-meta p{
margin:0;
line-height:1.45;
}

@media(max-width:768px){

.detail-grid{
grid-template-columns:1fr;
}

}

/* =========================
   GLOBAL FORM SYSTEM
========================= */

.form-shell{
max-width:1280px;
margin:0 auto;
padding:18px;
}

.form-card{
max-width:1280px;
}

.form-grid{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:16px;
}

.form-input,
.form-textarea{
width:100%;

border:1px solid #d1d5db;
border-radius:14px;

background:#fff;

padding:14px 16px;

font-size:14px;
font-family:inherit;
color:#111827;

outline:none;

transition:
border-color .18s ease,
box-shadow .18s ease,
background .18s ease;
}

.form-input{
height:52px;
}

.form-textarea{
min-height:120px;
resize:vertical;
}

.form-input:focus,
.form-textarea:focus{
border-color:#7c3aed;
box-shadow:0 0 0 4px rgba(124,58,237,.12);
}

.form-input[readonly],
.form-textarea[readonly]{
background:#f9fafb;
color:#6b7280;
}

.form-actions{
display:flex;
justify-content:flex-end;
align-items:center;
gap:10px;

margin-top:24px;

flex-wrap:wrap;
}

.form-actions.center{
justify-content:center;
}

@media(max-width:768px){

.form-grid{
grid-template-columns:1fr;
}

.form-actions{
flex-direction:column;
align-items:stretch;
}

}

/* =========================
   DASHBOARD SYSTEM
========================= */

.dashboard-shell{
max-width:1280px;
margin:0 auto;
padding:18px;
}

.kpi-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
gap:16px;
}

.dashboard-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
gap:18px;
margin-top:18px;
}

.dashboard-card{
background:#fff;
border:1px solid #ececec;
border-radius:18px;
padding:18px;
box-shadow:0 10px 30px rgba(0,0,0,.04);
}

.dashboard-label{
font-size:12px;
font-weight:800;
color:#6b7280;
margin-bottom:8px;
}

.dashboard-value{
font-size:28px;
font-weight:900;
line-height:1;
}

.dashboard-row{
display:flex;
justify-content:space-between;
align-items:center;
gap:12px;
padding:8px 0;
}

.dashboard-chart{
width:100% !important;
height:190px !important;
}

/* =========================
   AUTOCOMPLETE
========================= */
.autocomplete-box{
  position:relative;
}

.autocomplete-results{
  position:absolute;
  top:100%;
  left:0;
  width:100%;
  background:#fff;
  border:1px solid #ddd;
  border-radius:6px;
  box-shadow:0 8px 18px rgba(0,0,0,.08);
  z-index:999;
  max-height:220px;
  overflow-y:auto;
  display:none;
}

.autocomplete-item{
  padding:10px 12px;
  cursor:pointer;
}

.autocomplete-item:hover{
  background:#ede9fe;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:1100px){
  .dashboard-layout{
    flex-direction:column-reverse;
  }

  .dashboard-sidebar{
    width:100%;
    min-width:0;
    position:relative;
    top:0;
  }
}

@media (max-width:900px){
  .nav-center{
    flex-wrap:wrap;
  }
}

@media (max-width:768px){
  /* FIX HAMBURGER VISIBILITY */
.nav-left{
  justify-content:flex-start !important;
}

#menuToggle{
  display:block !important;
}

.nav-logo{
  margin-left:5px;
}
.navbar{
  position:relative;
}
  .item-row{
    grid-template-columns:1fr;
  }

  #mainMenu{
  width:100%;
}

  .sub-item-editor{
    grid-template-columns:1fr !important;
    margin-left:0;
    width:100%;
  }

  .remove-btn{
    width:100%;
    height:40px;
  }

  .dual-buttons{
    grid-template-columns:1fr;
  }
}

@media (max-width:600px){

}


/* =========================
   ITEM CARD
========================= */
.item-card-row{
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px;
  margin-bottom:18px;
  box-shadow:0 2px 6px rgba(0,0,0,.03);
}

/* =========================
   SECOND ROW
========================= */
.item-bottom-row{
  display:grid;
  grid-template-columns:90px 120px auto;
  gap:10px;
  align-items:center;
  margin-top:12px;
}

/* =========================
   ACTION BUTTONS
========================= */
.action-group{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  justify-content:flex-start;
}

/* =========================
   ACTION TOOLBAR
========================= */

.action-toolbar{
display:flex;
gap:8px;
flex-wrap:wrap;
}

.action-toolbar button{
width:42px;
height:42px;
min-width:42px;

display:inline-flex;
align-items:center;
justify-content:center;

border-radius:12px;
border:1px solid #e5e7eb;

background:#f8fafc;

cursor:pointer;

font-size:14px;
font-weight:800;
color:#374151;

transition:.15s ease;

box-shadow:0 1px 2px rgba(0,0,0,.05);

padding:0;
}

.action-toolbar button:hover{
background:#ede9fe;
border-color:#c4b5fd;
color:#7c3aed;
transform:translateY(-1px);
}

.action-toolbar button:disabled{
opacity:.45;
cursor:not-allowed;
background:#f3f4f6;
color:#9ca3af;
transform:none;
}


/* =========================
   SEPARACION ENTRE ITEMS
========================= */
.item-group{
  margin-bottom:22px;
}

.group-actions{
  margin-top:12px;
}


/* =========================
   BOTON DELETE CLIENTES
========================= */
.delete-btn{
  background:#ef4444;
  color:#fff;
  border:none;
}

.delete-btn:hover{
  background:#dc2626;
  transform:translateY(-1px);
}

.delete-btn:active{
  transform:scale(.98);
}


/* =========================
   LOGIN PRO
========================= */
.login-wrapper{
  min-height:calc(100vh - 90px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px;
}

.login-card{
  width:420px;
  max-width:100%;
  background:#fff;
  border-radius:16px;
  padding:35px;
  box-shadow:0 12px 30px rgba(0,0,0,.08);
}

.login-title{
  margin:0 0 10px;
  text-align:center;
  color:#7c3aed;
  font-size:30px;
}

.login-subtitle{
  text-align:center;
  color:#6b7280;
  margin-bottom:22px;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.login-form input{
  width:100%;
  padding:13px 14px;
  border:1px solid #d1d5db;
  border-radius:10px;
  font-size:15px;
  outline:none;
}

.login-form input:focus{
  border-color:#7c3aed;
  box-shadow:0 0 0 3px rgba(124,58,237,.12);
}

.login-error{
  background:#fee2e2;
  color:#b91c1c;
  border:1px solid #fecaca;
  padding:12px;
  border-radius:10px;
  margin-bottom:15px;
  text-align:center;
}


/* =====================================
   MOBILE PRO UPGRADE
===================================== */

@media (max-width:768px){

  body{
    font-size:14px;
  }

  .container{
    padding:15px;
  }

  .section-box,
.table-wrap,
.login-card{
  padding:15px;
  border-radius:12px;
}

  .navbar{
    padding:12px;
    gap:12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
  }

  .nav-logo{
    width:95px;
  }

  .tab{
    padding:10px 14px;
    font-size:14px;
  }

  .global-sidebar{
    padding:15px;
  }

  .global-sidebar .side-link{
    padding:12px;
    font-size:14px;
  }

  .stats-grid,
  .quick-grid{
    grid-template-columns:1fr;
  }

  .stat-card p{
    font-size:24px;
  }

  .actions{
    gap:4px;
  }

  .mini-btn{
    padding:8px 10px;
    font-size:12px;
  }

  .pro-table{
    min-width:760px;
  }

  .table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  .legal-note{
    max-width:100%;
  }

  .grand-total{
    font-size:22px;
  }

  .login-title{
    font-size:26px;
  }

  .search-input,
.login-form input{
  font-size:16px;
}

  .btn{
  min-height:44px;
}
}

@media (max-width:480px){

  .container{
    padding:10px;
  }

  .tab{
    width:100%;
    text-align:center;
  }

  .login-card{
    padding:18px;
  }

  .section-box h2,
  .login-title{
    font-size:22px;
  }

  .mini-btn{
    width:100%;
    text-align:center;
  }

  .actions{
    flex-direction:column;
    align-items:stretch;
  }

  .pro-table{
    min-width:680px;
  }
}

/* =====================================
   SIDEBAR FINAL CLEAN
===================================== */

.global-sidebar{
  position:fixed;
  top:88px;
  right:20px;
  width:320px;
  max-height:calc(100vh - 110px);
  overflow-y:auto;
  background:#fff;
  border-radius:22px;
  padding:18px;
  box-shadow:0 12px 28px rgba(0,0,0,.08);
  z-index:1000;
}

.container.with-sidebar{
  margin-right:360px;
}

.side-link{
  display:grid;
  grid-template-columns:26px 1fr;
  align-items:center;
  gap:12px;
  height:48px;
  padding:0 14px;
  margin-bottom:8px;
  background:#f5f3ff;
  border-radius:14px;
  text-decoration:none;
  color:#1f2937;
  font-weight:700;
  font-size:15px;
  transition:.18s;
}

.side-link:hover{
  background:#ede9fe;
}

.side-link.active-side{
  background:#ede9fe;
  color:#6d28d9;
}

.side-ico{
  width:26px;
  height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}

.side-text{
  line-height:1;
  white-space:nowrap;
}

@media (max-width:1100px){
  .global-sidebar{
    position:relative;
    top:0;
    right:0;
    width:100%;
    max-height:none;
    margin:20px 0;
  }

  .container.with-sidebar{
    margin-right:0;
  }
}

/* =========================
   PROJECT TABS SYSTEM
========================= */

.tabs-wrap{
max-width:1280px;
margin:0 auto 16px auto;
}

.tabs{
display:flex;
gap:6px;
padding:0 6px;
margin-bottom:-1px;
}

.tabs .tab{
flex:1;
text-align:center;
padding:12px;
border-radius:12px 12px 0 0;
background:#e5e7eb;
color:#4b5563;
font-weight:700;
text-decoration:none;
transition:all .25s ease;
border:1px solid transparent;
}

.tabs .tab:hover{
background:#ddd6fe;
color:#4c1d95;
transform:translateY(-2px);
}

.tabs .tab.active{
background:linear-gradient(135deg,#6d28d9,#7c3aed);
color:#fff;
border:1px solid #6d28d9;
border-bottom:1px solid #ffffff;
z-index:2;
position:relative;
box-shadow:0 6px 18px rgba(124,58,237,.25);
}

.tab-content{
background:#ffffff;
border:1px solid #ececec;
border-radius:0 0 16px 16px;
padding-top:10px;
box-shadow:0 10px 30px rgba(0,0,0,.04);
animation:fadeSlide .25s ease;
}

@keyframes fadeSlide{
from{
opacity:0;
transform:translateY(8px);
}
to{
opacity:1;
transform:translateY(0);
}
}

/* =========================
   UTILITY SYSTEM
========================= */

.flex{
display:flex;
}

.flex-wrap{
flex-wrap:wrap;
}

.items-center{
align-items:center;
}

.justify-between{
justify-content:space-between;
}

.justify-center{
justify-content:center;
}

.gap-10{
gap:10px;
}

.gap-12{
gap:12px;
}

.gap-14{
gap:14px;
}

.gap-16{
gap:16px;
}

.w-full{
width:100%;
}

.text-center{
text-align:center;
}

.mt-10{
margin-top:10px;
}

.mt-14{
margin-top:14px;
}

.mt-16{
margin-top:16px;
}

.mt-20{
margin-top:20px;
}

.relative{
position:relative;
}

.mb-14{
margin-bottom:14px;
}

.gap-20{
gap:20px;
}

.mb-30{
margin-bottom:30px;
}

/* =====================================
   PREMIUM PUBLIC NAVBAR
===================================== */

.public-navbar{
position:sticky;
top:0;
z-index:5000;

background:
linear-gradient(
135deg,
#111827 0%,
#1f2937 100%
);

border-bottom:1px solid rgba(255,255,255,.06);

backdrop-filter:blur(16px);
}

.dashboard-navbar{
background:#fff;
border-bottom:1px solid #ececec;
}

.public-navbar-inner{
width:100%;

min-height:92px;

padding:0 24px;

display:grid;
grid-template-columns:auto 1fr auto;
align-items:center;
gap:20px;
}

.public-left{
display:flex;
align-items:center;
gap:14px;
flex-shrink:0;
}

.public-right{
display:flex;
align-items:center;
justify-content:flex-end;
gap:12px;
}

.public-logo-wrap{
display:flex;
align-items:center;
text-decoration:none;
}

.public-logo{
width:170px;
height:auto;
object-fit:contain;
display:block;
}

.public-menu{
display:flex;
align-items:stretch;
justify-content:center;

height:92px;

width:100%;
}

.public-link{
position:relative;

min-width:150px;

padding:0 26px;

border-left:1px solid rgba(255,255,255,.08);

text-decoration:none;

color:#f9fafb;

font-weight:500;

transition:.25s ease;

display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:8px;
}

.public-link:last-child{
border-right:1px solid rgba(255,255,255,.08);
}

.public-link:hover{
background:rgba(124,58,237,.18);
}

.public-link::after{
content:'';
position:absolute;
left:0;
right:0;
bottom:0;
height:3px;
background:#7c3aed;
transform:scaleX(0);
transition:.25s ease;
}

.public-link:hover::after,
.public-link.active-public::after{
transform:scaleX(1);
}

.public-icon{
width:42px;
height:42px;

border-radius:50%;

background:rgba(255,255,255,.08);

border:1px solid rgba(255,255,255,.12);

font-size:18px;

color:#fff;

display:flex;
align-items:center;
justify-content:center;

transition:.25s ease;
}

.public-link:hover .public-icon,
.public-link.active-public .public-icon{
background:#7c3aed;
transform:translateY(-2px);
box-shadow:0 8px 20px rgba(124,58,237,.35);
}

.public-text{
font-size:16px;
font-weight:600;
letter-spacing:.2px;
}

.active-public{
background:rgba(124,58,237,.12);
}

.public-auth-btn{
height:46px;
padding:0 22px;

border-radius:14px;

background:
linear-gradient(
135deg,
#a855f7,
#7c3aed
);

color:#fff;
text-decoration:none;
font-size:14px;
font-weight:800;

box-shadow:
0 10px 24px rgba(124,58,237,.25);

transition:.2s ease;

display:inline-flex;
align-items:center;
justify-content:center;
}

.public-auth-btn:hover{
transform:translateY(-2px);
}

.public-hamburger{
display:none;

width:48px;
height:48px;

border:none;
border-radius:12px;

background:rgba(255,255,255,.08);

color:#fff;

font-size:22px;

cursor:pointer;
}

/* =====================================
   MOBILE
===================================== */

@media(max-width:980px){

.public-navbar-inner{
min-height:84px;
}

.public-hamburger{
display:flex;
align-items:center;
justify-content:center;
}

.public-menu{
position:absolute;

top:84px;
left:0;
right:0;

height:auto;

background:#111827;

border-top:1px solid rgba(255,255,255,.08);

flex-direction:column;

padding:14px;

gap:10px;

display:none;
}

.public-menu.active-mobile{
display:flex;
}

.public-link{
min-width:100%;
height:72px;

border:none !important;

border-radius:18px;

flex-direction:row;
justify-content:flex-start;
padding:0 18px;
gap:14px;
}

.public-link::after{
display:none;
}

.public-logo{
width:145px;
}

.public-right{
display:flex;
justify-content:center;
gap:10px;

width:100%;

margin-top:10px;
}

}

/* =====================================
   PUBLIC NAVBAR LIGHT MODE FIX
===================================== */

.dashboard-navbar .public-link{
color:#374151;
border-left:1px solid #ececec;
}

.dashboard-navbar .public-link:last-child{
border-right:1px solid #ececec;
}

.dashboard-navbar .public-icon{
background:#f5f3ff;
border:1px solid #ddd6fe;
color:#7c3aed;
}

.dashboard-navbar .public-link:hover{
background:#faf7ff;
}

.dashboard-navbar .active-public{
background:#f5f3ff;
}

/* =====================================
   LUXURY SAAS SIDEBAR
===================================== */

.global-sidebar{

background:
linear-gradient(
180deg,
#111827 0%,
#1f2937 100%
);

border-left:1px solid rgba(255,255,255,.06);

box-shadow:
-10px 0 40px rgba(0,0,0,.18);

}

/* PROFILE */

.profile-box{

border-bottom:
1px solid rgba(255,255,255,.08);

padding-bottom:18px;
}

.profile-name{
color:#f9fafb !important;
}

.profile-sub{
color:#9ca3af !important;
}

/* TITLES */

.global-sidebar h3{
color:#6b7280 !important;
}

/* LINKS */

.side-link{

background:
rgba(255,255,255,.04);

border:
1px solid rgba(255,255,255,.05);

color:#e5e7eb !important;

border-radius:16px;

transition:.22s ease;

backdrop-filter:blur(10px);
}

.side-link:hover{

background:
rgba(124,58,237,.18);

border-color:
rgba(124,58,237,.35);

transform:
translateX(-2px);

box-shadow:
0 10px 24px rgba(124,58,237,.18);
}

.active-side{

background:
linear-gradient(
135deg,
#7c3aed,
#a855f7
) !important;

border-color:
transparent !important;

box-shadow:
0 12px 26px rgba(124,58,237,.35);
}

/* ICONS */

.side-ico{
color:#c4b5fd;
}

/* SEARCH */

.search-input{

background:
rgba(255,255,255,.05);

border:
1px solid rgba(255,255,255,.08);

color:#fff;

transition:.2s ease;
}

.search-input::placeholder{
color:#9ca3af;
}

.search-input:focus{

border-color:#7c3aed;

box-shadow:
0 0 0 4px rgba(124,58,237,.15);

background:
rgba(255,255,255,.08);
}

/* LIVE SEARCH */

.live-box{

background:#1f2937;

border:
1px solid rgba(255,255,255,.08);
}

.live-item{

color:#f9fafb !important;

border-bottom:
1px solid rgba(255,255,255,.04);
}

.live-item:hover{
background:
rgba(124,58,237,.18);
}

/* ONLINE USERS */

.online-user{

background:
rgba(255,255,255,.04);

border:
1px solid rgba(255,255,255,.05);
}

.online-name{
color:#f9fafb;
}

.online-time{
color:#9ca3af;
}

/* DIVIDERS */

.global-sidebar hr{
border:none;
height:1px;

background:
rgba(255,255,255,.08);

margin:18px 0;
}

/* =====================================
   CONTACT PAGE
===================================== */

.contact-page{

padding:100px 40px;

background:
linear-gradient(
135deg,
#111827,
#1f2937
);
}

.contact-grid{

max-width:1400px;
margin:0 auto;

display:grid;
grid-template-columns:1fr 480px;
gap:60px;
align-items:center;
}

.contact-badge{

display:inline-flex;
align-items:center;
justify-content:center;

height:42px;
padding:0 18px;

border-radius:999px;

background:
rgba(255,255,255,.08);

border:
1px solid rgba(255,255,255,.08);

color:#fff;
font-size:13px;
font-weight:800;
letter-spacing:.8px;

margin-bottom:24px;
}

.contact-title{

font-size:68px;
line-height:1.05;
font-weight:900;

color:#fff;

margin-bottom:24px;
}

.contact-text{

font-size:18px;
line-height:1.9;

color:#d1d5db;

max-width:700px;

margin-bottom:38px;
}

.contact-info-list{

display:flex;
flex-direction:column;
gap:18px;
}

.contact-item{

display:flex;
align-items:flex-start;
gap:16px;

padding:22px;

border-radius:24px;

background:
rgba(255,255,255,.05);

border:
1px solid rgba(255,255,255,.06);

backdrop-filter:blur(12px);
}

.contact-icon{

width:54px;
height:54px;

border-radius:18px;

background:
linear-gradient(
135deg,
#a855f7,
#7c3aed
);

color:#fff;
font-size:22px;

display:flex;
align-items:center;
justify-content:center;

flex-shrink:0;
}

.contact-label{

font-size:13px;
font-weight:700;

letter-spacing:.6px;
text-transform:uppercase;

color:#9ca3af;

margin-bottom:6px;
}

.contact-value{

font-size:16px;
font-weight:700;
line-height:1.6;

color:#fff;
}

/* MAP */

.contact-map-section{

padding:90px 40px;

background:#f8fafc;
}

.contact-map-head{

max-width:1400px;
margin:0 auto 36px;

display:flex;
align-items:flex-end;
justify-content:space-between;
gap:40px;
}

.section-mini-title{

font-size:13px;
font-weight:900;
letter-spacing:1px;

color:#7c3aed;

margin-bottom:12px;
}

.contact-map-head h2{

font-size:54px;
line-height:1.1;
font-weight:900;

color:#111827;
}

.contact-map-head p{

max-width:520px;

font-size:16px;
line-height:1.9;

color:#6b7280;
}

.contact-map-wrap{

max-width:1400px;
margin:0 auto;

overflow:hidden;

border-radius:34px;

box-shadow:
0 20px 50px rgba(0,0,0,.08);
}

.contact-map-wrap iframe{

width:100%;
height:540px;

border:none;
}

/* MOBILE */

@media(max-width:1100px){

.contact-grid{
grid-template-columns:1fr;
}

.contact-title{
font-size:54px;
}

}

@media(max-width:768px){

.contact-page,
.contact-map-section{
padding:70px 20px;
}

.contact-title{
font-size:42px;
}

.contact-text{
font-size:16px;
}

.contact-map-head{
flex-direction:column;
align-items:flex-start;
}

.contact-map-head h2{
font-size:38px;
}

.contact-map-wrap iframe{
height:420px;
}

}

/* =====================================
   CONTACT FORM CARD
===================================== */

.contact-form-card{

background:#fff;

border-radius:34px;

padding:40px;

box-shadow:
0 30px 60px rgba(0,0,0,.25);

width:100%;
max-width:480px;

justify-self:end;
}

.contact-form-card h2{

font-size:42px;
font-weight:900;

color:#111827;

margin-bottom:12px;
}

.contact-form-card p{

font-size:15px;
line-height:1.8;

color:#6b7280;

margin-bottom:24px;
}

.contact-form{

display:flex;
flex-direction:column;
gap:16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea{

width:100%;

border:1px solid #e5e7eb;

border-radius:18px;

padding:16px 18px;

font-size:15px;

outline:none;

transition:.2s ease;

background:#fff;
}

.contact-form textarea{

min-height:140px;

resize:vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{

border-color:#7c3aed;

box-shadow:
0 0 0 4px rgba(124,58,237,.12);
}

.contact-form button{

height:58px;

border:none;

border-radius:18px;

background:
linear-gradient(
135deg,
#a855f7,
#7c3aed
);

color:#fff;

font-size:15px;
font-weight:800;

cursor:pointer;

box-shadow:
0 18px 34px rgba(124,58,237,.26);

transition:.22s ease;
}

.contact-form button:hover{
transform:translateY(-2px);
}