/* ETRIXTECH E-TEKNISI V77 — CRUD, privilege, report list, build fix UI */
:root{
  --v76-bg:#eef5f9;
  --v76-panel:#ffffff;
  --v76-line:#bfd0dc;
  --v76-line-strong:#91a9b9;
  --v76-text:#173047;
  --v76-muted:#60788b;
  --v76-primary:#0878b9;
  --v76-primary-dark:#075f92;
  --v76-soft:#e4f4fd;
  --v76-success:#14875a;
  --v76-warning:#bd6b0a;
  --v76-danger:#bd3340;
  --v76-shadow:0 12px 30px rgba(39,68,88,.12), inset 1px 1px 0 rgba(255,255,255,.9);
  --v76-shadow-small:0 4px 12px rgba(39,68,88,.12), inset 1px 1px 0 rgba(255,255,255,.95);
}
html,body{background:var(--v76-bg)!important;color:var(--v76-text)!important}
body{font-family:Inter,"Segoe UI",Arial,sans-serif!important}
*{box-sizing:border-box}
.v76-hidden{display:none!important}

/* Production login: no server/developer controls on the user-facing screen. */
.server-login-box{display:none!important}
.login-screen,.license-screen{background:
  radial-gradient(circle at 12% 12%,rgba(46,164,220,.17),transparent 34%),
  radial-gradient(circle at 90% 90%,rgba(14,116,144,.13),transparent 32%),
  linear-gradient(145deg,#edf7fc,#e3eef4)!important}
.login-card,.license-card{
  border:1px solid var(--v76-line)!important;
  border-radius:28px!important;
  box-shadow:0 24px 60px rgba(32,67,91,.18),inset 1px 1px 0 #fff!important;
  padding:30px!important;
  overflow:hidden;
}
.login-card:before,.license-card:before{
  content:"";display:block;height:6px;margin:-30px -30px 24px;
  background:linear-gradient(90deg,#0577b4,#28a9dc,#0e7490)
}
.login-logo,.license-logo{max-width:132px!important;filter:drop-shadow(0 6px 12px rgba(13,87,126,.16))}
.login-kicker{letter-spacing:.16em!important;color:var(--v76-primary)!important;font-weight:900!important}
.login-card h1,.license-card h1{color:#153047!important;letter-spacing:-.02em}
.login-subtitle,.license-subtitle{color:var(--v76-muted)!important;line-height:1.55!important}

/* Main shell */
.app-shell{background:var(--v76-bg)!important;min-height:100vh}
.sidebar{
  background:linear-gradient(180deg,#f8fcff,#e7f1f6)!important;
  border-right:1px solid var(--v76-line)!important;
  box-shadow:8px 0 28px rgba(46,73,91,.08)!important;
}
.brand{border-bottom:1px solid var(--v76-line)!important;padding-bottom:18px!important}
.brand h1{color:#12344b!important;letter-spacing:.04em}
.brand p{color:var(--v76-muted)!important}
.nav{gap:6px!important;padding-right:5px!important}
.nav button{
  min-height:44px!important;border:1px solid transparent!important;border-radius:14px!important;
  color:#29485d!important;font-weight:750!important;background:transparent!important;
  box-shadow:none!important;transition:.16s ease!important
}
.nav button:hover{background:#f7fbfd!important;border-color:#d1e0e9!important;transform:translateX(2px)}
.nav button.active{
  background:linear-gradient(180deg,#f8fdff,#dff2fc)!important;
  color:#075f92!important;border-color:#91bdd4!important;
  box-shadow:var(--v76-shadow-small)!important
}
.nav-ico{width:30px!important;height:30px!important;border-radius:10px!important;background:#fff!important;display:grid!important;place-items:center!important;border:1px solid #d1e0e8!important}
.sidebar-footer{color:#688094!important;border-top:1px solid var(--v76-line)!important}
.main{min-width:0!important}
.topbar{
  min-height:78px!important;background:rgba(248,252,255,.95)!important;
  border-bottom:1px solid var(--v76-line)!important;
  box-shadow:0 7px 20px rgba(45,72,90,.08)!important;
  backdrop-filter:blur(12px)
}
#pageTitle{font-size:20px!important;color:#15344b!important}
#pageSub{color:var(--v76-muted)!important;margin-top:3px!important}
.top-actions{align-items:center!important;gap:10px!important}
.v76-sync-chip{
  display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 10px;
  border:1px solid #b9ccd8;border-radius:999px;background:#fff;color:#557084;
  font-size:12px;font-weight:800;box-shadow:inset 1px 1px 0 #fff
}
.v76-sync-chip i{width:9px;height:9px;border-radius:50%;background:#e59d19;box-shadow:0 0 0 3px rgba(229,157,25,.12)}
.v76-sync-chip.ok i{background:#1b9a66;box-shadow:0 0 0 3px rgba(27,154,102,.13)}
.v76-sync-chip.error i{background:#c63a48;box-shadow:0 0 0 3px rgba(198,58,72,.13)}
.content{padding:24px!important}
.footer{color:#6a8193!important;border-top:1px solid #cbd9e2!important}

/* Controls */
button,.file-label{font-family:inherit!important}
button.primary,.primary{
  background:linear-gradient(180deg,#1593cf,#0878b9)!important;
  border:1px solid #05679f!important;color:#fff!important;border-radius:12px!important;
  box-shadow:0 5px 12px rgba(7,101,153,.22),inset 1px 1px 0 rgba(255,255,255,.35)!important;
  font-weight:800!important
}
button.primary:hover,.primary:hover{background:linear-gradient(180deg,#168ac1,#076b9f)!important;transform:translateY(-1px)}
button.ghost,.ghost,.file-label{
  background:linear-gradient(180deg,#fff,#edf3f7)!important;color:#28475c!important;
  border:1px solid #aabfcd!important;border-radius:12px!important;
  box-shadow:var(--v76-shadow-small)!important;font-weight:800!important
}
button.danger,.danger{background:linear-gradient(180deg,#d94b59,#b9303d)!important;border-color:#9f2835!important;color:#fff!important}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(15,143,199,.2)!important;outline-offset:1px!important}
input,select,textarea{
  border:1px solid #aebfca!important;border-radius:12px!important;background:#fff!important;color:#173047!important;
  box-shadow:inset 0 1px 2px rgba(44,69,87,.08)!important;min-height:44px!important
}
textarea{min-height:92px!important}
input::placeholder,textarea::placeholder{color:#8799a7!important}

/* Content hierarchy */
.card{
  border:1px solid var(--v76-line)!important;border-radius:18px!important;background:var(--v76-panel)!important;
  box-shadow:var(--v76-shadow)!important;padding:20px!important;margin-bottom:18px!important
}
.section-head{gap:14px!important;margin-bottom:16px!important;padding-bottom:13px!important;border-bottom:1px solid #d5e1e8!important}
.section-head h3{color:#17374e!important;font-size:18px!important;letter-spacing:-.01em!important}
.section-actions{gap:9px!important;flex-wrap:wrap!important}
.muted-note{color:var(--v76-muted)!important;line-height:1.5!important}
.form-grid{gap:14px!important}
.form-grid>button[type="submit"]{min-height:46px!important;padding-inline:22px!important}
.form-grid .wide{grid-column:1/-1!important}
.table-card{overflow:auto!important;padding:0!important}
.table-card .section-head{padding:18px 18px 12px!important;margin:0!important}
table{border-collapse:separate!important;border-spacing:0!important;width:100%!important}
th{position:sticky;top:0;background:#edf5f9!important;color:#29495f!important;border-bottom:1px solid #b9ccd8!important;font-size:12px!important;text-transform:uppercase!important;letter-spacing:.045em!important}
th,td{padding:13px 14px!important}
tbody tr:nth-child(even){background:#f9fcfe!important}
tbody tr:hover{background:#eef8fd!important}
td{border-bottom:1px solid #e0e8ed!important;color:#294457!important}
.badge{border-radius:999px!important;font-weight:800!important;padding:5px 9px!important}

/* Dashboard */
.dashboard-kpi-grid{gap:15px!important}
.dashboard-kpi{
  border-radius:18px!important;border:1px solid #b9cdd9!important;background:#fff!important;
  box-shadow:var(--v76-shadow)!important;text-align:left!important;min-height:132px!important
}
.dashboard-kpi:hover{transform:translateY(-2px)!important}
.dashboard-kpi span{color:#536f82!important;font-weight:800!important}
.dashboard-kpi strong{color:#15364d!important}
.dashboard-kpi em{filter:saturate(.9)!important}
.dash-card{border-radius:18px!important}
.rating-card{display:none!important}

/* Streamlined workflow: keep data exports in Backup only. */
#exportCustomerCsv,#exportTicketCsv,#exportTechnicianCsv,#exportSurveyCsv,#exportRabCsv,
#exportInvoiceCsv,#exportMaterialCsv,#exportShopCsv,#exportTemplateCsv,#exportReportCsv,
#exportChatCsv,#exportMaintCsv,#exportUserCsv,#seedMaterialDb,#resetDefaultTemplates,
#printSurvey,#printRab,#printInvoice,#printReport,#enableNotifBtn,#refreshLicenseInfo,#resetData{
  display:none!important
}

/* Ticket, task, report and chat cards */
.ticket-list,.cards-grid{gap:14px!important}
.ticket-card,.report-card,.chat-card,.etx-task-card-v76{
  border:1px solid #bfd0dc!important;border-radius:17px!important;background:#fff!important;
  box-shadow:var(--v76-shadow-small)!important
}
.etx-task-list-v76{display:grid;gap:13px}
.etx-task-card-v76{padding:15px}
.etx-task-head-v76{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.etx-task-head-v76 b{font-size:14px;color:#0a6a9d}
.etx-task-card-v76 h3{font-size:19px;margin:0 0 10px;color:#16364c}
.etx-task-meta-v76{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin:10px 0}
.etx-task-meta-v76 div{background:#f4f9fc;border:1px solid #d9e6ee;border-radius:11px;padding:9px}
.etx-task-meta-v76 small{display:block;color:#6b8292;font-weight:700;margin-bottom:3px}
.etx-task-meta-v76 strong{display:block;color:#27475c;line-height:1.35;overflow-wrap:anywhere}
.etx-task-desc-v76{padding:11px;border:1px solid #d7e4eb;border-radius:12px;background:#fbfdff;color:#38566a;line-height:1.5}
.etx-task-actions-v76{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
.etx-task-actions-v76 button,.etx-task-actions-v76 a{min-height:40px;flex:1 1 125px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;padding:8px 11px}
.etx-empty-v76{text-align:center;padding:28px;color:#678092;font-weight:750}
.chat-thread{background:transparent!important}
.chat-form-modern{border-radius:16px!important;background:#f5fafc!important;border:1px solid #d2e0e8!important;padding:12px!important}
.chat-compose-row textarea{min-height:48px!important;max-height:130px!important}

/* Mobile browser / APK base */
#v76MobileHeader,#v76ProfileModal{display:none}
body.v76-apk{overflow-x:hidden!important;background:#edf6fa!important}
body.v76-apk #sidebar,body.v76-apk .sidebar,body.v76-apk .topbar,body.v76-apk .footer,
body.v76-apk #bottomNav,body.v76-apk [id^="etxMobileHeader"],body.v76-apk [class*="etx-v75-bottom"],
body.v76-apk [class*="apk-user-chip"]{display:none!important}
body.v76-apk #appShell{padding-top:calc(76px + env(safe-area-inset-top))!important;min-height:100vh!important}
body.v76-apk .main{margin:0!important;width:100%!important;max-width:none!important}
body.v76-apk .content{padding:12px 10px 24px!important;overflow-x:hidden!important}
body.v76-apk .view{max-width:100%!important}
body.v76-apk .card{padding:14px!important;border-radius:16px!important;margin-bottom:12px!important}
body.v76-apk .section-head{align-items:flex-start!important;flex-direction:column!important;gap:9px!important}
body.v76-apk .section-actions{width:100%!important}
body.v76-apk .section-actions>*{max-width:100%!important}
body.v76-apk .search,body.v76-apk select{width:100%!important}
body.v76-apk .form-grid{grid-template-columns:1fr!important;gap:11px!important}
body.v76-apk .table-card{overflow-x:auto!important}
body.v76-apk .table-card table{min-width:650px!important}
body.v76-apk #v76MobileHeader{
  display:flex;position:fixed;z-index:2147483000;top:0;left:0;right:0;
  min-height:calc(68px + env(safe-area-inset-top));padding:calc(9px + env(safe-area-inset-top)) 12px 8px;
  align-items:center;justify-content:space-between;gap:10px;background:rgba(244,250,253,.98);
  border-bottom:1px solid #afc5d3;box-shadow:0 6px 20px rgba(33,67,89,.13)
}
.v76-mobile-title{min-width:0;display:flex;align-items:center;gap:10px}
.v76-mobile-icon{width:43px;height:43px;border-radius:14px;background:#fff;border:1px solid #b7ccd9;display:grid;place-items:center;font-size:22px;box-shadow:var(--v76-shadow-small);flex:0 0 auto}
.v76-mobile-copy{min-width:0}
.v76-mobile-copy b{display:block;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:56vw;color:#17364d}
.v76-mobile-copy small{display:block;color:#60798b;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:56vw}
.v76-mobile-status{display:flex;align-items:center;gap:6px;color:#4c687b;font-size:11px;font-weight:800}
.v76-mobile-status i{width:9px;height:9px;border-radius:50%;background:#df9e1f}
.v76-mobile-status.ok i{background:#15905f}
.v76-mobile-status.error i{background:#c13b47}

/* Profile modal */
#v76ProfileModal{position:fixed;inset:0;z-index:2147483600;background:rgba(13,33,47,.42);padding:18px;align-items:center;justify-content:center}
#v76ProfileModal.show{display:flex}
.v76-profile-card{width:min(420px,96vw);background:#fff;border:1px solid #afc5d3;border-radius:22px;box-shadow:0 28px 70px rgba(14,35,50,.3);padding:20px}
.v76-profile-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:13px;border-bottom:1px solid #d7e3ea}
.v76-profile-user{text-align:center;padding:20px 8px 12px}
.v76-profile-avatar{width:70px;height:70px;border-radius:24px;margin:0 auto 10px;background:#e4f4fd;border:1px solid #a9cadb;display:grid;place-items:center;font-size:35px;box-shadow:var(--v76-shadow-small)}
.v76-profile-user h3{margin:0 0 4px;color:#18384f}
.v76-profile-user p{margin:0;color:#698192;font-weight:750}
.v76-profile-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed #d6e2e8;color:#536f82}
.v76-profile-row b{color:#27475d}
.v76-profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}

@media(max-width:1100px){
  .content{padding:18px!important}
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .content{padding:12px!important}
  .card{padding:15px!important;border-radius:15px!important}
  .section-head{align-items:flex-start!important;flex-direction:column!important}
  .section-actions{width:100%!important}
  .section-actions .search{width:100%!important}
  .dashboard-kpi-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .dashboard-kpi{min-height:112px!important;padding:13px!important}
  .etx-task-meta-v76{grid-template-columns:1fr!important}
}
@media(max-width:430px){
  .dashboard-kpi-grid{grid-template-columns:1fr!important}
  .login-card,.license-card{padding:22px 18px!important;border-radius:22px!important}
  .login-card:before,.license-card:before{margin:-22px -18px 18px}
}
@media print{
  #v76MobileHeader,#v76ProfileModal,.v76-sync-chip{display:none!important}
  body{background:#fff!important}
}

/* === V77: report list, user privilege and modal polish === */
.etx-report-list-v77{display:grid;gap:10px;margin-top:12px}
.etx-report-row-v77{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:stretch;background:#fff;border:1px solid #bfd0dc;border-radius:15px;padding:12px;box-shadow:0 4px 12px rgba(39,68,88,.11)}
.etx-report-thumb-v77{width:96px;height:96px;object-fit:cover;border:1px solid #c6d8e3;border-radius:12px;background:#eef6fa}
.etx-report-thumb-v77.empty{display:grid;place-items:center;font-size:30px;color:#728a9a}
.etx-report-main-v77{min-width:0}
.etx-report-title-v77{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.etx-report-title-v77 strong{font-size:16px;color:#17384e;overflow-wrap:anywhere}
.etx-report-grid-v77{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:8px}
.etx-report-grid-v77 span{display:block;min-width:0;padding:7px 8px;border:1px solid #dde8ee;border-radius:9px;background:#f7fbfd}
.etx-report-grid-v77 small{display:block;color:#6b8292;font-weight:700;margin-bottom:2px}
.etx-report-grid-v77 b{display:block;font-size:12px;color:#2b4a5f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.etx-report-main-v77>p{margin:7px 0;color:#435f72;line-height:1.45;white-space:pre-line}
.etx-report-foot-v77{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px dashed #d4e1e8;padding-top:8px}
.etx-report-foot-v77>small{color:#6a8192;font-weight:750}
.etx-report-foot-v77 .actions{display:flex;gap:7px;flex-wrap:wrap;margin:0}
.v77-priv-box,.v77-edit-priv{border:1px solid #bfd2df;border-radius:14px;padding:13px;background:#f7fbfd}
.v77-priv-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.v77-priv-head strong,.v77-priv-head small{display:block}
.v77-priv-head small{margin-top:3px;color:#657d8f}
.v77-priv-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.v77-priv-grid label{display:flex;align-items:center;gap:8px;padding:8px 9px;border:1px solid #d4e2ea;border-radius:10px;background:#fff;font-weight:700;color:#35566b}
.v77-priv-grid input{width:17px;height:17px;min-height:0!important;margin:0;flex:0 0 auto}
.v77-modal{display:none;position:fixed;inset:0;z-index:2147483644;background:rgba(13,33,47,.48);padding:18px;align-items:center;justify-content:center;overflow:auto}
.v77-modal.show{display:flex}
.v77-modal-card{width:min(820px,97vw);max-height:94vh;overflow:auto;background:#fff;border:1px solid #abc3d1;border-radius:20px;padding:18px;box-shadow:0 28px 70px rgba(14,35,50,.34)}
.v77-modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid #d6e3ea}
@media(max-width:900px){.etx-report-grid-v77{grid-template-columns:repeat(2,minmax(0,1fr))}.v77-priv-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.etx-report-row-v77{grid-template-columns:64px minmax(0,1fr);gap:10px;padding:10px}.etx-report-thumb-v77{width:64px;height:64px}.etx-report-grid-v77{grid-template-columns:1fr}.etx-report-title-v77{align-items:flex-start}.etx-report-foot-v77{align-items:flex-end}.v77-priv-grid{grid-template-columns:1fr}.v77-priv-head{align-items:flex-start;flex-direction:column}body.v76-apk .etx-report-row-v77{grid-template-columns:58px minmax(0,1fr)}body.v76-apk .etx-report-thumb-v77{width:58px;height:58px}}
.v77-no-access{display:none!important;visibility:hidden!important;pointer-events:none!important}
