
:root{--bg:#eef3f8;--surface:#ffffff;--line:#d8e0ea;--text:#243042;--muted:#708090;--nav:#1e293b;--nav-hover:#334155;--blue:#2f8cff;--green:#14a34b;--orange:#f08c27;--red:#dc4a4a}
*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
.topbar{height:58px;background:linear-gradient(#f8fafc,#e5ecf4);border-bottom:1px solid #cdd7e1;display:flex;align-items:center;justify-content:space-between;padding:0 16px}
.brand{display:flex;align-items:center;gap:8px;font-weight:700}.badge{width:28px;height:28px;border-radius:4px;background:#f0b429;color:#fff;display:grid;place-items:center;font-weight:800}
.layout{display:grid;grid-template-columns:250px 1fr;min-height:calc(100vh - 58px)}
.sidebar{background:var(--nav);padding:14px;overflow:auto}.sidebar a{display:block;padding:10px 12px;border-radius:8px;color:#d9e2ec;text-decoration:none;font-size:13px;margin-bottom:4px}.sidebar a:hover,.sidebar a.active{background:var(--nav-hover);color:#fff}
.content{padding:16px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px}.page-title{margin-bottom:12px}.page-title h1{margin:0;font-size:22px}.page-title p{margin:4px 0 0;color:var(--muted);font-size:13px}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.btn{border:1px solid #bfccd9;background:linear-gradient(#fff,#edf3f8);border-radius:8px;padding:8px 12px;cursor:pointer;font-size:13px}.btn.blue{background:linear-gradient(#54abff,#2f8cff);color:#fff;border-color:#1c77df}.btn.green{background:linear-gradient(#36c96d,#14a34b);color:#fff;border-color:#0f853d}.btn.orange{background:linear-gradient(#ffb362,#f08c27);color:#fff;border-color:#d9791b}.btn.red{background:linear-gradient(#f37f7f,#dc4a4a);color:#fff;border-color:#c03d3d}
.grid{display:grid;grid-template-columns:1.55fr .95fr;gap:14px}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}input,select,textarea{width:100%;padding:8px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;font:inherit}textarea{min-height:90px;resize:vertical}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.tab-btn{padding:8px 11px;border:1px solid var(--line);background:#f5f9fd;border-radius:8px;cursor:pointer}.tab-btn.active{background:#dfeaf7}.tab-panel{display:none}.tab-panel.active{display:block}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px}table{width:100%;border-collapse:collapse;background:#fff;font-size:13px}th,td{border-bottom:1px solid #e8eef5;padding:8px 9px;text-align:left;vertical-align:top}th{background:#f5f9fd}tfoot td{font-weight:700;background:#fbfdff}
.meta{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.meta-card{border:1px solid var(--line);border-radius:8px;padding:10px;background:#fbfdff}
.list{border:1px solid var(--line);border-radius:10px;max-height:380px;overflow:auto;background:#fff}.list-item{padding:10px;border-bottom:1px solid #e6edf4}
.notice{display:none;padding:10px 12px;background:#eef7ff;border:1px solid #c8dfff;border-radius:8px;margin-bottom:12px}.notice.show{display:block}.small{font-size:12px;color:var(--muted)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px}.kpi .n{font-size:28px;font-weight:800}
.chart{height:190px;display:flex;align-items:flex-end;gap:10px}.bar{flex:1;background:linear-gradient(#6ab5ff,#2f8cff);border-radius:10px 10px 0 0;position:relative;min-height:24px}.bar span{position:absolute;bottom:-22px;left:50%;transform:translateX(-50%);font-size:11px;color:var(--muted);white-space:nowrap}
.timeline{border-left:3px solid #d4e0ed;padding-left:10px}.timeline-item{margin-bottom:12px}.media-list .file,.notes-list .note{border:1px solid var(--line);border-radius:8px;padding:8px;margin-bottom:8px;background:#fff}.media-list img{max-width:100%;max-height:120px;display:block;margin-top:6px}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;align-items:center;justify-content:center;padding:20px}.modal.open{display:flex}.split{display:grid;grid-template-columns:1fr 1fr;gap:12px}.picklist{border:1px solid var(--line);border-radius:8px;max-height:300px;overflow:auto;background:#fff}.pick-item{padding:8px 10px;border-bottom:1px solid #edf1f6;cursor:pointer}.pick-item:hover{background:#f5f9ff}
@media (max-width:1050px){.layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.grid,.form-grid,.meta,.kpis,.split{grid-template-columns:1fr}}


/* V18 ERP-SD upgrade */
.erp-flow{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.erp-flow .step{padding:7px 10px;border:1px solid #d7e0ea;border-radius:999px;background:#f5f9fd;font-size:12px}
.erp-highlight{background:#fff7e8;border:1px solid #ffd58a;border-radius:10px;padding:10px;margin-bottom:12px}
.right-summary .summary-box{margin-bottom:10px}
.kv-switch{display:flex;align-items:center;gap:8px;margin-top:6px}
.customer-history{max-height:220px;overflow:auto}

/* V18 ERP-SD v2 */
.customer-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}


/* flow validation fixed */
.erp-flow .step{cursor:pointer;user-select:none}
.erp-flow .step.active{background:#2f8cff;color:#fff;border-color:#1f78de}


/* history patch */
.doc-history-box .list-item{padding:8px 10px}
.doc-history-box .doc-tag{display:inline-block;padding:3px 6px;border-radius:999px;background:#eef5ff;font-size:11px;margin-right:6px}
.stock-mini{margin-top:8px;font-size:12px;color:#6b7c8f}


/* chain patch */
.chain-box{background:#fbfdff;border:1px solid #d7e0ea;border-radius:10px;padding:10px;margin-top:12px}
.chain-badge{display:inline-block;padding:3px 8px;border-radius:999px;background:#eef5ff;font-size:11px;margin-right:6px}


/* cari hesap patch */
.cari-kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}
.cari-kpi{background:#fff;border:1px solid #d7e0ea;border-radius:10px;padding:10px}
.cari-kpi .n{font-size:22px;font-weight:700}
@media (max-width:1050px){.cari-kpi-grid{grid-template-columns:1fr}}


/* GLOBAL UI PATCH */
:root{
  --g-bg:#eef3f8;
  --g-surface:#ffffff;
  --g-line:#d5deea;
  --g-text:#1f2e3d;
  --g-muted:#6d7f92;
  --g-primary:#0b5cab;
  --g-primary-2:#0f172a;
  --g-accent:#1f8fff;
}
body{background:var(--g-bg)!important;color:var(--g-text)!important}
.global-shell{max-width:1600px;margin:0 auto}
.global-topnav{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:12px 18px;background:linear-gradient(90deg,#0f172a,#16324f);
  color:#fff;border-bottom:1px solid rgba(255,255,255,.08);position:sticky;top:0;z-index:50
}
.global-brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:.2px}
.global-brand-badge{
  width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#1f8fff,#64b5ff);
  display:grid;place-items:center;color:#fff;font-weight:800;box-shadow:0 8px 20px rgba(0,0,0,.18)
}
.global-links{display:flex;gap:8px;flex-wrap:wrap}
.global-links a,.global-right a,.lang-chip{
  color:#eaf2fb;text-decoration:none;padding:8px 12px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);font-size:12px
}
.global-links a:hover,.global-right a:hover,.lang-chip:hover{background:rgba(255,255,255,.12)}
.global-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.global-hero{
  background:
   radial-gradient(circle at 20% 20%, rgba(31,143,255,.16), transparent 28%),
   radial-gradient(circle at 80% 15%, rgba(100,181,255,.16), transparent 24%),
   linear-gradient(180deg,#f8fbff,#eef4fb);
  border:1px solid var(--g-line);border-radius:16px;padding:22px 24px;margin:18px 0 14px 0
}
.global-hero h1{margin:0 0 6px 0;font-size:28px}
.global-hero p{margin:0;color:var(--g-muted)}
.global-kicker{
  display:inline-block;padding:6px 10px;border-radius:999px;background:#e8f2ff;color:var(--g-primary);
  font-size:12px;font-weight:700;margin-bottom:10px
}
.panel,.card,.box,.grid,.row,.summary-box{box-shadow:0 8px 28px rgba(17,24,39,.04)}
.enterprise-table{border-collapse:separate;border-spacing:0;width:100%;background:#fff;border:1px solid var(--g-line);border-radius:14px;overflow:hidden}
.enterprise-table thead th{background:#f6f9fd;color:#4f6478}
.enterprise-table tbody tr:hover{background:#f9fbfe}
.page-soft-title{font-size:12px;color:var(--g-muted);text-transform:uppercase;letter-spacing:.14em}
.global-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.global-section-title h2,.global-section-title h3{margin:0}
.global-card{
  background:var(--g-surface);border:1px solid var(--g-line);border-radius:14px;padding:16px
}
.global-actions{display:flex;gap:8px;flex-wrap:wrap}
.global-actions a,.global-actions button{
  padding:9px 12px;border-radius:10px;border:1px solid var(--g-line);background:#fff;color:var(--g-text);text-decoration:none
}
.global-actions .primary{background:linear-gradient(180deg,#2a95ff,#0b72d9);color:#fff;border-color:#0b72d9}
@media (max-width:980px){
  .global-topnav{padding:12px}
  .global-links,.global-right{width:100%}
  .global-topnav{flex-direction:column;align-items:flex-start}
}


/* HEADER PRO PATCH */
.global-topnav{
  min-height:68px!important;
  padding:12px 22px!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  box-shadow:0 10px 30px rgba(2,8,23,.18);
}
.global-brand{
  min-width:210px;
}
.global-brand > div:last-child{
  line-height:1.05;
}
.global-brand > div:last-child > div:first-child{
  font-size:15px;
}
.global-brand > div:last-child > div:last-child{
  font-size:11px!important;
  opacity:.72;
}
.global-links{
  gap:8px!important;
}
.global-links a{
  padding:9px 14px!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.04)!important;
  border:1px solid rgba(255,255,255,.08)!important;
  font-size:13px!important;
  font-weight:600;
  transition:all .18s ease;
}
.global-links a:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.09)!important;
  border-color:rgba(255,255,255,.16)!important;
}
.global-links a.active{
  background:linear-gradient(180deg,#2a95ff,#0b72d9)!important;
  border-color:#0b72d9!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(11,114,217,.32);
}
.global-right{
  gap:8px!important;
}
.lang-chip,
.global-right a{
  padding:8px 11px!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.04)!important;
  border:1px solid rgba(255,255,255,.08)!important;
  font-size:12px!important;
  font-weight:600;
  transition:all .18s ease;
}
.lang-chip:hover,
.global-right a:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.09)!important;
  border-color:rgba(255,255,255,.16)!important;
}
.lang-chip.active{
  background:linear-gradient(180deg,#2a95ff,#0b72d9)!important;
  border-color:#0b72d9!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(11,114,217,.32);
}
.global-hero{
  padding:18px 22px!important;
  margin:16px 0 12px 0!important;
}
.global-hero h1{
  font-size:24px!important;
  line-height:1.1;
}
.global-hero p{
  font-size:14px;
  max-width:760px;
}
@media (max-width:980px){
  .global-topnav{
    padding:12px 14px!important;
    gap:10px!important;
  }
  .global-brand{
    min-width:auto;
  }
  .global-links a,
  .lang-chip,
  .global-right a{
    padding:8px 10px!important;
    font-size:12px!important;
  }
}

/* ===== V51 MULTI BRANCH ===== */
.branch-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0}
.branch-chip{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2ff;font-size:12px}
.branch-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.branch-card{background:#fff;border:1px solid #d7dee8;border-radius:14px;padding:14px}
.branch-table{width:100%;border-collapse:collapse}
.branch-table th,.branch-table td{padding:8px;border-bottom:1px solid #eef2f7;text-align:left}
@media (max-width:900px){.branch-grid{grid-template-columns:1fr}}


/* ===== V56 ACCOUNTING + E-FATURA ===== */
.acc-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.acc-card{background:#fff;border:1px solid #d7dee8;border-radius:14px;padding:14px}
.acc-table{width:100%;border-collapse:collapse}
.acc-table th,.acc-table td{padding:8px;border-bottom:1px solid #eef2f7;text-align:left}
.code-badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2ff;font-size:12px}
@media (max-width:900px){.acc-grid{grid-template-columns:1fr}}


/* ===== V58 STOCK + WAREHOUSE ===== */
.wh-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.wh-card{background:#fff;border:1px solid #d7dee8;border-radius:14px;padding:14px}
.wh-table{width:100%;border-collapse:collapse}
.wh-table th,.wh-table td{padding:8px;border-bottom:1px solid #eef2f7;text-align:left}
.pill{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;background:#eef2ff}
@media (max-width:900px){.wh-grid{grid-template-columns:1fr}}


/* ===== V59 MUHASEBE + E-FATURA FULL ===== */
.doc-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.doc-card{background:#fff;border:1px solid #d7dee8;border-radius:14px;padding:14px}
.doc-table{width:100%;border-collapse:collapse}
.doc-table th,.doc-table td{padding:8px;border-bottom:1px solid #eef2f7;text-align:left}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px}
.badge.draft{background:#eef2ff;color:#3730a3}
.badge.approved{background:#dcfce7;color:#166534}
.badge.sent{background:#dbeafe;color:#1d4ed8}
.badge.cancelled{background:#fee2e2;color:#b91c1c}
pre.xmlbox{white-space:pre-wrap;background:#0f172a;color:#e5e7eb;padding:12px;border-radius:12px;overflow:auto}
@media (max-width:900px){.doc-grid{grid-template-columns:1fr}}


/* ===== V60 OPS SUITE ===== */
.ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.ops-card{background:#fff;border:1px solid #d7dee8;border-radius:14px;padding:14px}
.ops-table{width:100%;border-collapse:collapse}
.ops-table th,.ops-table td{padding:8px;border-bottom:1px solid #eef2f7;text-align:left}
.tag{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px}
.tag.wait{background:#fff7ed;color:#9a3412}
.tag.run{background:#dbeafe;color:#1d4ed8}
.tag.done{background:#dcfce7;color:#166534}
@media (max-width:900px){.ops-grid{grid-template-columns:1fr}}


/* ===== V60.1 HOTEL REAL WORKFLOW ===== */
.hotel-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}
.hotel-card{background:#fff;border:1px solid #d7dee8;border-radius:14px;padding:14px}
.hotel-table{width:100%;border-collapse:collapse}
.hotel-table th,.hotel-table td{padding:8px;border-bottom:1px solid #eef2f7;text-align:left;vertical-align:top}
.hotel-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.status-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px}
.status-occupied{background:#dbeafe;color:#1d4ed8}
.status-vacant{background:#dcfce7;color:#166534}
.status-dirty{background:#fff7ed;color:#9a3412}
.status-reserved{background:#ede9fe;color:#6d28d9}
.status-cleaning{background:#fef3c7;color:#92400e}
.folio-list{display:flex;flex-direction:column;gap:6px}
.folio-item{display:flex;justify-content:space-between;gap:10px;padding:8px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa}
@media (max-width:900px){.hotel-grid{grid-template-columns:1fr}}


/* V61 UI PRESERVE CORE */
.core-box{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px}
.core-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.core-inline{min-width:180px}


/* ===== V64 HEADER LAYOUT FIX ===== */
.global-topnav{
  gap:12px !important;
  flex-wrap:wrap !important;
  align-items:center !important;
}
.global-topnav > *{
  min-width:0;
}
.global-brand{
  flex:1 1 280px !important;
  min-width:220px !important;
}
.global-brand > div:last-child{
  min-width:0;
}
.global-brand h1,
.global-brand p{
  margin:0;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
.global-brand h1{
  font-size:clamp(20px,2vw,30px) !important;
  line-height:1.12 !important;
}
.global-brand p{
  font-size:13px !important;
  line-height:1.35 !important;
  opacity:.9;
}
.global-brand h1:empty,
.global-brand p:empty{
  display:none !important;
}
.global-links{
  flex:1 1 420px !important;
  justify-content:center !important;
  row-gap:8px !important;
}
.global-links a{
  font-size:12px !important;
  padding:7px 10px !important;
}
.global-right{
  flex:0 1 auto !important;
  justify-content:flex-end !important;
  row-gap:8px !important;
}
.global-right a, .lang-chip{
  font-size:12px !important;
  padding:7px 10px !important;
}
@media (max-width:1100px){
  .global-topnav{
    padding:10px 12px !important;
  }
  .global-brand{
    flex:1 1 100% !important;
  }
  .global-links{
    flex:1 1 100% !important;
    justify-content:flex-start !important;
  }
  .global-right{
    flex:1 1 100% !important;
    justify-content:flex-start !important;
  }
}

/* hotel header consistency */
.hotel-page-shell{
  min-height:100vh;
  background:#f5f7fb;
}
.hotel-page-shell .wrap{
  padding-top:16px;
}


/* ===== V64 REAL HEADER FIX ===== */
.global-shell{max-width:none !important;margin:0 !important;}
.global-topnav{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:18px !important;
  padding:12px 18px !important;
  background:linear-gradient(90deg,#0f172a,#16324f) !important;
  color:#fff !important;
  position:sticky !important;
  top:0 !important;
  z-index:5000 !important;
  flex-wrap:nowrap !important;
}
.global-brand{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-width:220px !important;
  flex:0 0 auto !important;
}
.global-brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.global-brand-title{
  font-size:15px;
  font-weight:700;
  color:#fff;
}
.global-brand-sub{
  font-size:11px;
  color:#cbd5e1;
}
.global-links{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  flex:1 1 auto !important;
  flex-wrap:nowrap !important;
  overflow-x:auto;
  scrollbar-width:none;
}
.global-links::-webkit-scrollbar{display:none;}
.global-links a{
  white-space:nowrap !important;
  font-size:12px !important;
  padding:8px 10px !important;
}
.global-right{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex:0 0 auto !important;
}
.global-right .lang-chip,
.global-right a{
  white-space:nowrap !important;
  font-size:12px !important;
  padding:8px 10px !important;
}
.global-topnav .lang-chip.active{
  background:#2563eb !important;
  border-color:#2563eb !important;
  color:#fff !important;
}
#v596Mount,.v596-topbar,.v596-drawer,.v596-drawer-backdrop{display:none !important;}
@media (max-width:980px){
  .global-topnav{
    flex-wrap:wrap !important;
  }
  .global-brand{min-width:auto !important;}
  .global-links{
    order:3;
    width:100%;
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
    overflow:visible;
  }
  .global-right{
    margin-left:auto;
  }
}


/* ===== V66 GLOBAL ROUTER ===== */
.router-status-badge{
  margin-left:auto;
  padding:6px 10px;
  border-radius:999px;
  background:linear-gradient(135deg,#0ea5e9,#2563eb);
  color:#fff;
  font-size:11px;
  font-weight:700;
  box-shadow:0 8px 18px rgba(37,99,235,.20);
}
.topbar{gap:12px}

.lang-chip{display:none!important}
