:root{
  --bg:#0b1020;--bg-2:#0f1730;--panel:#121a2f;--panel-2:#17213b;--text:#e8eefc;--muted:#9fb0d2;--line:#233150;
  --blue:#58a6ff;--blue-2:#2d7cff;--green:#36c275;--amber:#f5b63f;--red:#ff6b6b;--white:#fff;
  --cardshadow:0 22px 44px rgba(5,10,20,.28);--softshadow:0 12px 28px rgba(16,36,70,.08)
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;min-width:320px;background:radial-gradient(circle at top,#172750 0,#0b1020 42%,#07101b 100%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;overflow-x:hidden}
a{text-decoration:none;color:inherit}
img,svg,video,canvas{max-width:100%;height:auto}

button,.button,.link-btn{
  cursor:pointer;border:none;border-radius:14px;
  background:linear-gradient(135deg,var(--blue),var(--blue-2));
  color:#fff;padding:11px 16px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:8px;
  transition:.2s transform,.2s box-shadow,.2s opacity;min-height:44px
}
button:hover,.button:hover,.link-btn:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(45,124,255,.18)}
button:disabled,.button:disabled,.link-btn:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}
.button.ghost,.link-btn{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);color:#203459;box-shadow:none}
.link-btn.danger,.button.danger{background:rgba(255,107,107,.16);border-color:rgba(255,107,107,.3);color:#af3a3a}

input,select,textarea{
  width:100%;max-width:100%;padding:12px 14px;border-radius:14px;border:1px solid #d8e0ef;background:#fff;color:#182338;font:inherit;outline:none;appearance:none;-webkit-appearance:none
}
input:focus,select:focus,textarea:focus{border-color:#8bb8ff;box-shadow:0 0 0 4px rgba(88,166,255,.15)}
textarea{resize:vertical;min-height:120px}
label{font-size:.92rem;color:#42506d;font-weight:700}
.checkline{display:flex;gap:10px;align-items:center;color:#31405e}

.shell{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:100vh}
.sidebar{background:rgba(8,14,27,.72);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);padding:28px 22px;border-right:1px solid rgba(255,255,255,.08);display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100vh;z-index:30}
.sidebar-toggle,.sidebar-close,.sidebar-backdrop{display:none}
.brand{display:flex;gap:14px;align-items:center;min-width:0}.brand-icon{width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,var(--blue),var(--green));display:grid;place-items:center;font-size:1.45rem;font-weight:800;flex:0 0 auto}.brand-top{font-weight:800}.brand-bottom{color:var(--muted);font-size:.92rem}
.menu{display:grid;gap:8px}.menu a{padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid transparent;color:#dfe8fb;font-weight:700}.menu a:hover{border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.08)}
.status-card{margin-top:auto;padding:16px;border-radius:18px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);display:flex;gap:12px}.dot{width:12px;height:12px;border-radius:999px;background:var(--green);margin-top:5px;box-shadow:0 0 0 6px rgba(54,194,117,.12)}

.content{padding:26px;min-width:0}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px;gap:16px}.topbar-title{margin:0 0 6px;font-size:clamp(1.4rem,2vw,1.9rem);font-weight:900;line-height:1.1}.eyebrow{font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#89a8dd;margin-bottom:8px}.topbar p{margin:0;color:var(--muted)}.user-pill{padding:12px 16px;border-radius:16px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1);display:grid;gap:4px;text-align:right;max-width:100%}.user-pill span,.user-pill small{overflow-wrap:anywhere}.user-pill small{color:var(--muted)}

.card{background:linear-gradient(180deg,rgba(255,255,255,.99),rgba(244,248,255,.98));color:#16233f;border:1px solid rgba(255,255,255,.6);border-radius:24px;padding:22px;box-shadow:var(--cardshadow);margin-bottom:18px;min-width:0;overflow:hidden}
.soft-card{background:#f6f9ff}
.hero{display:flex;justify-content:space-between;align-items:center;gap:16px}
.dashboard-hero{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(234,242,255,.98))}
.hero-left{display:flex;gap:16px;align-items:center;min-width:0}
.check{width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,#e6f1ff,#d7f8e7);display:grid;place-items:center;font-size:1.35rem;flex:0 0 auto}
.hero h2,.section-head h2,.section-head h3,h3,h4,h5{margin:0;overflow-wrap:anywhere}
.hero p,.section-head p,.muted{color:#67748f}
.badge,.status-pill{padding:9px 12px;border-radius:999px;font-weight:800;font-size:.82rem;background:#edf3ff;color:#2d5ca8;display:inline-flex;align-items:center;gap:8px;max-width:100%;overflow-wrap:anywhere}
.badge.active,.status-pill.is-success{background:#e8fbf0;color:#1f8d53}
.status-pill.is-warning{background:#fff4de;color:#a36a00}
.status-pill.is-danger{background:#ffe7e7;color:#bc3b3b}
.status-pill.is-neutral{background:#eef2f8;color:#5c6882}
.soft-pill{padding:8px 12px;border-radius:999px;background:#edf3ff;color:#38588f;font-size:.82rem;font-weight:700;max-width:100%;overflow-wrap:anywhere}
.hero-tags{display:flex;gap:8px;flex-wrap:wrap}
.section-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.grid{display:grid;gap:18px;min-width:0}
.grid>*{min-width:0}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}
.span-2{grid-column:span 2}
.stats-grid .card,.metric-card{text-align:center}
.big-number{font-size:1.8rem;font-weight:900;line-height:1.1;overflow-wrap:anywhere}
.small-big{font-size:1.15rem}
.small{font-size:.9rem}
.top-gap{margin-top:18px}
.top-gap-sm{margin-top:10px}

.metric{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed #dce4f1}
.metric.no-border{border-bottom:none}
.metric:last-child{border-bottom:none}
.metric span{color:#67748f}
.metric strong{overflow-wrap:anywhere;text-align:right}
.metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mini-stat{padding:12px 14px;border-radius:16px;background:#f6f9ff;border:1px solid #e4ebf4;display:grid;gap:6px}
.mini-stat span{font-size:.82rem;color:#66748e}
.mini-stat strong{font-size:.94rem;overflow-wrap:anywhere}
.progress{height:12px;background:#e7eef9;border-radius:999px;overflow:hidden}
.progress>div{height:100%;background:linear-gradient(90deg,#2d7cff,#36c275);max-width:100%}
.notice-grid,.file-table,.stack,.stack-lg,.ticket-thread{display:grid;gap:12px}

.notice{padding:13px 15px;border-radius:16px;font-weight:700}
.notice.warning{background:#fff7e8;color:#b67805}
.notice.danger{background:#ffeaea;color:#c84848}

.file-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px;border:1px solid #e2e9f4;border-radius:18px;background:#fbfdff;transition:.18s border-color,.18s box-shadow,.18s transform;min-width:0}
.file-row:hover{border-color:#bdd2f7;box-shadow:0 8px 20px rgba(30,56,104,.07)}
.file-row>div{min-width:0}
.file-row strong,.file-row small,.small{display:block;overflow-wrap:anywhere;word-break:break-word}
.file-row small,.small{color:#697891;margin-top:4px}
.file-row.compact{padding:14px}
.selectable-row{cursor:pointer}
.selectable-row.is-selected{border-color:#73a8ff;background:#eef5ff;box-shadow:0 0 0 4px rgba(88,166,255,.12)}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.actions>*{max-width:100%}
.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.inline-form input[type=text]{display:none;min-width:180px}
.service-edit{padding:12px;border:1px solid #e3eaf4;border-radius:16px;background:#fff;display:grid;gap:10px;margin-bottom:10px}
.split-panels{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.customer-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px}
.customer-tile{padding:18px;border-radius:22px;background:linear-gradient(180deg,#fff,#f6f9ff);border:1px solid #e1e8f3;box-shadow:0 10px 30px rgba(16,36,70,.08)}
.service-card{position:relative;overflow:hidden}
.service-card::after{content:"";position:absolute;inset:auto -40px -50px auto;width:120px;height:120px;background:radial-gradient(circle,rgba(88,166,255,.16),transparent 70%)}
.tile-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px}
.tile-subhead{color:#6a7892;font-size:.9rem}
.service-note{padding:10px 12px;border-radius:14px;background:#eff6ff;color:#39588c}
.glow-card{background:linear-gradient(135deg,#0d1f3f,#17366d);color:#fff}
.glow-card p{color:#dce7ff}
.quick-links{display:flex;gap:10px;flex-wrap:wrap}
.auth-shell{max-width:840px;margin:0 auto}
.narrow{max-width:780px}
.hero-mini{display:grid;gap:10px}
.alert{padding:14px 16px;border-radius:16px;margin:0 0 16px;overflow-wrap:anywhere}
.alert.success{background:#e9fbf0;color:#1b7d48}
.alert.error{background:#ffecec;color:#b33d3d}
.inline-card{background:#f8fbff;border-radius:18px;padding:18px}
.wrap{flex-wrap:wrap}

.action-card{padding:18px;border-radius:20px;border:1px solid #e1e8f3;background:linear-gradient(180deg,#fff,#f7faff)}
.selected-item-box{padding:14px;border-radius:16px;background:#f5f8ff;border:1px dashed #b8cbed;color:#29456f;font-weight:800;min-height:50px;display:flex;align-items:center;overflow-wrap:anywhere;word-break:break-word}
.breadcrumb-bar{display:flex;gap:8px;flex-wrap:wrap}
.crumb{padding:8px 12px;border-radius:999px;background:#f0f5ff;border:1px solid #d7e3f7;color:#3f5d8d;font-weight:700;max-width:100%;overflow-wrap:anywhere}
.crumb.active{background:#dfeeff;border-color:#b8d1fa}
.toolbar-search{min-width:240px}
.service-line{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.service-line>div{min-width:0}

.ticket-thread{gap:14px}
.ticket-message{background:linear-gradient(180deg,#fbfdff,#f4f8ff);padding:16px 18px;border-radius:18px;border:1px solid #dbe6f4;box-shadow:0 8px 24px rgba(22,35,63,.04);min-width:0}
.ticket-message.admin-msg{border-left:4px solid #2d7cff}
.ticket-message.customer-msg{border-left:4px solid #1bb56b}
.ticket-message-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.ticket-message-head>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}
.ticket-message-head strong,.ticket-message-head small,.ticket-message-body{overflow-wrap:anywhere;word-break:break-word}
.ticket-message-body{white-space:pre-wrap;line-height:1.7;background:#fff;border:1px solid #e8eef8;padding:14px;border-radius:14px}

.char-counter{display:flex;justify-content:flex-end;font-size:.86rem;color:#6c7a95;font-weight:700}
.field-help{font-size:.84rem;color:#7a88a3;margin-top:-4px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.stack>*{min-width:0}
.mobile-only{display:none}
.active-filter{background:#dfeeff!important;border-color:#b8d1fa!important;color:#234a85!important}
.explorer-tools .action-card{min-height:100%}
.action-card-lift{box-shadow:0 14px 34px rgba(18,41,82,.08)}
.file-grid-view{gap:14px}
.explorer-row,.trash-row{align-items:flex-start}
.file-primary{display:grid;gap:6px;min-width:0}

@media (max-width:1400px){
  .grid.five{grid-template-columns:repeat(3,minmax(0,1fr))}
  .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1100px){
  .shell{grid-template-columns:1fr}
  .sidebar{position:fixed;left:0;top:0;bottom:0;height:100vh;width:min(88vw,340px);transform:translateX(-102%);transition:transform .22s ease;box-shadow:0 20px 60px rgba(0,0,0,.38)}
  body.sidebar-open .sidebar{transform:translateX(0)}
  .sidebar-toggle,.sidebar-close{display:inline-flex}
  .sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(4,10,22,.55);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:25}
  body.sidebar-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  .sidebar-close{margin-left:auto;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12)}
  .content{padding:18px;min-width:0}
  .topbar{flex-direction:column;gap:16px}
  .topbar-main{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;width:100%}
  .grid.two,.grid.three,.grid.five{grid-template-columns:1fr}
  .split-panels{grid-template-columns:1fr}
  .span-2{grid-column:auto}
}
@media (max-width:760px){
  .hero,.hero-left,.service-line,.file-row,.actions,.inline-form,.quick-links,.metric,.ticket-message-head{flex-direction:column;align-items:stretch}
  .customer-grid,.grid.four,.metric-grid,.form-grid{grid-template-columns:1fr}
  .toolbar-search{min-width:0}
  .card{padding:18px}
  .topbar-title{font-size:1.3rem}
  .brand-icon,.check{width:48px;height:48px}
  .mobile-only{display:inline-flex}
  button,.button,.link-btn{width:100%}
  .actions .link-btn,.actions .button,.actions button{width:100%}
  .ticket-message-body{padding:12px}
}
@media (max-width:520px){
  .content{padding:14px}
  .card{border-radius:20px;padding:16px}
  .status-card{padding:14px}
  .badge,.soft-pill,.status-pill{justify-content:center}
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form input {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.button.danger {
  background: #e74c3c;
  color: white;
}

.explorer-search{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.explorer-search-box{
  position:relative;
  flex:1 1 520px;
  min-width:260px;
}

.explorer-search-icon{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  font-size:1rem;
  color:#6f7f9a;
  pointer-events:none;
}

.explorer-search-input{
  width:100%;
  height:54px;
  padding:0 48px 0 44px;
  border-radius:18px;
  border:1px solid #d8e3f2;
  background:linear-gradient(180deg,#ffffff,#f7faff);
  color:#16233f;
  font-size:.98rem;
  font-weight:600;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  box-shadow:0 10px 24px rgba(19,43,82,.05);
}

.explorer-search-input::placeholder{
  color:#8a97ad;
  font-weight:500;
}

.explorer-search-input:focus{
  border-color:#7eb0ff;
  box-shadow:0 0 0 5px rgba(88,166,255,.12), 0 14px 32px rgba(19,43,82,.08);
}

.explorer-search-clear{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border:none;
  border-radius:999px;
  background:#edf4ff;
  color:#43618f;
  font-size:1.1rem;
  font-weight:900;
  cursor:pointer;
  visibility:hidden;
  transition:transform .16s ease, background .16s ease;
}

.explorer-search-clear:hover{
  background:#dfeeff;
  transform:translateY(-50%) scale(1.05);
}

.explorer-search-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.explorer-row mark{
  background:#fff3bf;
  color:#6c5300;
  padding:1px 4px;
  border-radius:6px;
}

@media (max-width:760px){
  .explorer-search{
    align-items:stretch;
  }

  .explorer-search-box{
    min-width:0;
    flex:1 1 100%;
  }

  .explorer-search-meta{
    width:100%;
    justify-content:flex-start;
  }
}

.explorer-table{display:grid;gap:10px}
.explorer-head,.explorer-line{display:grid;grid-template-columns:minmax(220px,1.4fr) 120px 170px minmax(220px,1.2fr) minmax(260px,1.8fr);gap:12px;align-items:start}
.explorer-head{padding:12px 14px;border-radius:16px;background:#eef4ff;border:1px solid #dbe7fb;font-weight:800;color:#314b77}
.explorer-line{padding:14px;border:1px solid #e2e9f4;border-radius:18px;background:#fbfdff}
.explorer-line:hover{border-color:#bdd2f7;box-shadow:0 8px 20px rgba(30,56,104,.07)}
.explorer-name strong{display:block;overflow-wrap:anywhere}
.explorer-line small{color:#697891;overflow-wrap:anywhere;word-break:break-word}

@media (max-width:1100px){
  .explorer-head{display:none}
  .explorer-line{grid-template-columns:1fr}
}

/* ===== CUSTOMER PORTAL REDESIGN SAFE LAYER ===== */
.portal-shell{
  grid-template-columns:300px minmax(0,1fr);
  background:#e9edf3;
}

.portal-sidebar{
  background:
    radial-gradient(circle at bottom left, rgba(0,255,214,.14), transparent 28%),
    linear-gradient(180deg,#07122c 0%, #031127 55%, #02101f 100%);
  color:#fff;
  padding:24px 20px;
  border-right:1px solid rgba(255,255,255,.06);
}

.portal-brand{
  align-items:center;
  gap:14px;
  margin-bottom:26px;
}

.portal-brand-icon{
  background:linear-gradient(135deg,#16d6ff,#2d7cff);
  color:#fff;
  box-shadow:0 10px 24px rgba(45,124,255,.28);
}

.portal-menu{
  display:grid;
  gap:10px;
}

.portal-menu-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:18px;
  color:#dce8ff;
  font-weight:700;
  transition:.18s ease;
}

.portal-menu-item:hover,
.portal-menu-item.active{
  background:linear-gradient(90deg,rgba(52,119,255,.22),rgba(21,53,119,.16));
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05), 0 12px 28px rgba(0,0,0,.18);
}

.portal-menu-ico{
  width:22px;
  display:inline-flex;
  justify-content:center;
  font-size:1rem;
}

.portal-system-card{
  margin-top:26px;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(122,170,255,.18);
  background:linear-gradient(180deg,rgba(8,28,59,.82),rgba(7,20,42,.92));
  box-shadow:0 18px 42px rgba(0,0,0,.22);
}

.portal-system-title{
  font-size:1.2rem;
  font-weight:800;
  margin-bottom:8px;
}

.portal-system-ok{
  color:#76ffd3;
  font-weight:700;
  margin-bottom:14px;
}

.portal-system-art{
  height:150px;
  border-radius:18px;
  background:
    radial-gradient(circle at center, rgba(0,255,214,.25), transparent 38%),
    linear-gradient(180deg, rgba(30,187,255,.22), rgba(36,86,214,.18));
  border:1px solid rgba(130,226,255,.18);
}

.portal-content{
  background:linear-gradient(180deg,#edf1f6 0%, #e6ebf2 100%);
  padding:22px;
}

.portal-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  background:linear-gradient(180deg,#fbfcfe,#f2f4f8);
  border-radius:24px;
  padding:20px 24px;
  box-shadow:0 10px 32px rgba(27,47,84,.06);
  margin-bottom:22px;
}

.portal-page-title{
  font-size:2rem;
  font-weight:900;
  color:#16233f;
}

.portal-page-subtitle{
  margin-top:4px;
  color:#64748b;
  font-weight:600;
}

.portal-topbar-right{
  display:flex;
  align-items:center;
  gap:14px;
}

.portal-user-icon{
  width:46px;
  height:46px;
  border-radius:14px;
  background:#eef2f7;
  display:flex;
  align-items:center;
  justify-content:center;
}

.portal-user-copy{
  line-height:1.25;
}

.portal-user-welcome{
  color:#5b6477;
  font-size:.92rem;
}

.portal-user-name{
  font-weight:800;
  color:#16233f;
}

.portal-user-avatar{
  width:54px;
  height:54px;
  border-radius:50%;
  background:linear-gradient(135deg,#203a74,#162b57);
  color:#fff;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 24px rgba(17,35,75,.2);
}

.portal-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:22px 26px;
  border-radius:22px;
  border:1px solid #8fe0ba;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(243,255,249,.92)),
    linear-gradient(90deg,#ddfff0,#ecfff5);
  box-shadow:0 14px 34px rgba(53,157,98,.12);
  margin-bottom:18px;
}

.portal-hero-left{
  display:flex;
  align-items:center;
  gap:16px;
}

.portal-hero-check{
  width:56px;
  height:56px;
  border-radius:50%;
  background:linear-gradient(180deg,#19b460,#10944c);
  color:#fff;
  font-size:1.8rem;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 24px rgba(25,180,96,.22);
}

.portal-hero-title{
  font-size:1.9rem;
  font-weight:900;
  color:#132238;
}

.portal-hero-subtitle{
  margin-top:4px;
  color:#5e6c83;
  font-weight:600;
}

.portal-hero-badge{
  padding:12px 22px;
  border-radius:999px;
  background:linear-gradient(180deg,#18aa58,#118a47);
  color:#fff;
  font-weight:900;
  letter-spacing:.04em;
}

.portal-card{
  background:linear-gradient(180deg,#fbfcfe,#f4f6fa);
  border-radius:22px;
  padding:22px;
  box-shadow:0 10px 28px rgba(29,47,82,.06);
  border:1px solid #dde5f0;
  margin-bottom:18px;
}

.portal-section-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:1.5rem;
  font-weight:900;
  color:#17253d;
  margin-bottom:16px;
}

.portal-section-ico{
  width:38px;
  height:38px;
  border-radius:10px;
  background:#ecf1f7;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1rem;
}

.portal-customer-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(300px,.9fr);
  gap:18px;
  align-items:center;
}

.portal-customer-meta{
  display:grid;
  gap:14px;
}

.portal-customer-line{
  display:flex;
  gap:12px;
  align-items:center;
  padding-bottom:12px;
  border-bottom:1px solid #e4eaf3;
  color:#16233f;
}

.portal-label{
  min-width:140px;
  color:#6c7a95;
  font-weight:700;
}

.portal-customer-visual{
  min-height:180px;
  border-radius:20px;
  background:
    radial-gradient(circle at center, rgba(42,255,199,.25), transparent 32%),
    linear-gradient(135deg,#dffefa,#d7f1ff 55%, #ddfbef);
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #caedf2;
}

.portal-cloud-badge{
  padding:18px 24px;
  border-radius:999px;
  background:linear-gradient(180deg,#1bbd64,#149e54);
  color:#fff;
  font-weight:900;
  font-size:1.2rem;
  box-shadow:0 14px 28px rgba(20,158,84,.18);
}

.portal-grid{
  display:grid;
  gap:18px;
}

.portal-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.portal-storage-stack{
  display:grid;
  gap:12px;
}

.portal-storage-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg,#eef3f9,#e8eef7);
  border:1px solid #dde6f2;
  font-weight:800;
  color:#18243b;
}

.portal-storage-line.total{
  background:linear-gradient(180deg,#edf3fd,#e3ebfb);
}

.portal-status-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.portal-status-item{
  padding:14px 16px;
  border-radius:16px;
  background:#f7fbf8;
  border:1px solid #d7ebdc;
  color:#17924d;
  font-weight:800;
}

.portal-mini-card{
  min-height:120px;
}

.portal-mini-title{
  color:#17253d;
  font-size:1.45rem;
  font-weight:900;
  margin-bottom:12px;
}

.portal-mini-value{
  font-size:2rem;
  font-weight:900;
  color:#0f5fd7;
}

.portal-footer-bar{
  display:flex;
  justify-content:center;
  gap:28px;
  flex-wrap:wrap;
  color:#41516f;
  font-weight:700;
  padding:10px 0 2px;
}

@media (max-width:1200px){
  .portal-customer-grid,
  .portal-grid-2,
  .portal-status-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:1100px){
  .portal-shell{
    grid-template-columns:1fr;
  }
}

@media (max-width:760px){
  .portal-topbar,
  .portal-hero,
  .portal-topbar-right,
  .portal-hero-left,
  .portal-customer-line{
    flex-direction:column;
    align-items:flex-start;
  }

  .portal-page-title{
    font-size:1.5rem;
  }

  .portal-hero-title{
    font-size:1.35rem;
  }

  .portal-content{
    padding:14px;
  }
}

/* remove delivered hero area if any old block remains */
.portal-hero,
.portal-hero-left,
.portal-hero-badge,
.portal-cloud-badge,
.portal-customer-visual{
  display:none !important;
}

/* customer card single-column after removing right visual */
.portal-customer-grid{
  grid-template-columns:1fr !important;
}

/* clearer storage icon */
.portal-section-ico-storage{
  background:linear-gradient(180deg,#eef7ff,#dcecff) !important;
  color:#1677d8 !important;
  border:1px solid #c6dcf7;
  box-shadow:0 4px 12px rgba(22,119,216,.12);
}

/* footer text style */
.portal-footer-bar{
  margin-top:8px;
}

.portal-system-image {
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
}

.portal-system-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.guide-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}

.guide-header {
  padding: 12px 16px;
  cursor: pointer;
  background: #f9fafb;
}

.guide-header:hover {
  background: #f1f5f9;
}

.guide-body {
  display: none;
  padding: 15px;
}

.guide-body p {
  margin-bottom: 10px;
}

.guide-body ol {
  padding-left: 18px;
}

/* ===== CROSS BROWSER / MOBILE FIX LAYER ===== */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

body.sidebar-open {
  overflow: hidden;
}

.shell,
.portal-shell {
  min-width: 0;
  width: 100%;
}

.content,
.portal-content,
.sidebar,
.portal-sidebar,
.topbar,
.portal-topbar,
.card,
.table-wrap,
.explorer-wrap,
.explorer-table,
.explorer-line,
.explorer-name,
.portal-card,
.portal-topbar-left,
.portal-topbar-right,
.portal-user-copy,
.portal-customer-line,
.portal-storage-line,
.portal-footer-bar,
.topbar-main {
  min-width: 0;
}

.portal-topbar-left,
.portal-topbar-right,
.portal-user-copy,
.portal-customer-line,
.portal-storage-line,
.portal-footer-bar,
.topbar-main {
  flex-wrap: wrap;
}

.portal-page-title,
.portal-page-subtitle,
.portal-user-name,
.portal-user-welcome,
.brand-top,
.brand-bottom,
.explorer-name strong,
.explorer-line small,
.ticket-message-body,
.metric strong,
.user-pill span,
.user-pill small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar,
.portal-sidebar {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background-color: rgba(7, 18, 44, 0.96);
}

@supports ((-webkit-backdrop-filter: blur(18px)) or (backdrop-filter: blur(18px))) {
  .sidebar,
  .portal-sidebar {
    background: rgba(8, 14, 27, 0.72);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}

.explorer-head,
.explorer-line,
.explorer-line > div,
.explorer-head > div,
table,
.card,
.portal-card,
.file-row,
.actions,
.inline-form,
.file-actions {
  min-width: 0;
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1100px) {
  .shell,
  .portal-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar,
  .portal-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 320px);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 1001;
    border-right: 1px solid rgba(255,255,255,.08);
  }

  body.sidebar-open .sidebar,
  body.sidebar-open .portal-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 20, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 1000;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-toggle,
  .sidebar-close,
  .mobile-only {
    display: inline-flex !important;
  }

  .portal-content,
  .content {
    width: 100%;
    min-width: 0;
    padding: 14px;
  }

  .portal-topbar,
  .topbar {
    width: 100%;
    min-width: 0;
  }

  .portal-topbar {
    align-items: flex-start;
  }

  .portal-topbar-left,
  .portal-topbar-right {
    width: 100%;
  }

  .portal-topbar-right {
    justify-content: flex-start;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 760px) {
  .portal-topbar,
  .portal-topbar-right,
  .portal-customer-line,
  .portal-storage-line,
  .portal-footer-bar,
  .topbar-main,
  .service-line,
  .file-row,
  .actions,
  .inline-form,
  .quick-links,
  .metric,
  .ticket-message-head,
  .portal-hero,
  .portal-hero-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-page-title {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .portal-page-subtitle,
  .portal-user-name,
  .portal-user-welcome {
    line-height: 1.45;
  }

  .portal-card,
  .card {
    padding: 16px;
  }

  .portal-system-card {
    margin-top: 18px;
  }

  .explorer-line {
    grid-template-columns: 1fr !important;
  }

  .explorer-search-box,
  .toolbar-search {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .portal-content,
  .content {
    padding: 12px;
  }

  .portal-card,
  .card {
    border-radius: 18px;
    padding: 14px;
  }

  button,
  .button,
  .link-btn,
  .actions .link-btn,
  .actions .button,
  .actions button {
    width: 100%;
    max-width: 100%;
  }

  .inline-form,
  .file-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== SERVICE VIEW PREMIUM FINAL ===== */

.workspace-hero,
.service-panel,
.service-tool-card,
.restore-card,
.service-metric-row,
.service-row {
  color: #0f172a !important;
}

.workspace-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 26px 28px;
  margin-bottom: 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%);
  border: 1px solid #dbe4f0;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.workspace-hero-main,
.workspace-hero-actions,
.service-panel,
.service-tool-card,
.restore-card-main {
  min-width: 0;
}

.workspace-eyebrow {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b !important;
}

.workspace-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a !important;
}

.workspace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.workspace-code,
.workspace-plan-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #d7e3f2;
  color: #1e293b !important;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.service-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.service-secondary-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin-bottom: 20px;
}

.service-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.service-panel,
.service-tool-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe4f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.service-panel-primary {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-color: #cfe0f7;
}

.service-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.service-panel-head h3,
.service-tool-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a !important;
}

.service-panel-head p,
.service-tool-card p {
  margin: 6px 0 0;
  line-height: 1.5;
  color: #64748b !important;
}

.service-panel-kicker {
  margin-bottom: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b !important;
}

.service-metric-list {
  display: grid;
  gap: 12px;
}

.service-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e4edf7;
}

.service-metric-row span {
  font-size: 0.95rem;
  color: #475569 !important;
  font-weight: 600;
  white-space: nowrap;
}

.service-metric-row strong {
  max-width: 60%;
  text-align: right;
  line-height: 1.45;
  color: #0f172a !important;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.service-progress {
  height: 12px;
  margin-top: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef6;
}

.service-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.service-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.service-breadcrumb-wrap {
  display: grid;
  gap: 14px;
}

.restore-grid {
  display: grid;
  gap: 12px;
}

.restore-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e4edf7;
}

.restore-card-main {
  display: grid;
  gap: 4px;
}

.restore-card-main strong {
  color: #0f172a !important;
  font-weight: 800;
}

.restore-card-main small {
  color: #64748b !important;
  overflow-wrap: anywhere;
}

.service-explorer-table {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid #dbe4f0;
  background: #ffffff;
}

.service-explorer-table .explorer-head {
  background: #f1f6fc;
  border: none;
  border-radius: 0;
}

.service-explorer-table .explorer-head div {
  color: #334155 !important;
  font-weight: 800;
}

.service-row {
  border-bottom: 1px solid #edf2f8;
  background: #ffffff;
}

.service-row:last-child {
  border-bottom: 0;
}

.service-row .explorer-name strong,
.service-row .file-primary strong {
  color: #0f172a !important;
  font-weight: 800;
}

.service-row small,
.service-row .file-primary small,
.service-row .explorer-line small {
  color: #64748b !important;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-actions .inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.service-actions input[type="text"] {
  min-width: 150px;
  max-width: 190px;
}

.service-tool-card input[type="text"],
.service-tool-card input[type="file"],
.service-tool-card button,
.service-tool-card .button {
  width: 100%;
}

.workspace-hero .button,
.service-panel .button,
.service-tool-card .button,
.restore-card .button,
.service-row .button {
  border-radius: 14px;
  font-weight: 700;
}

.workspace-hero .button:not(.ghost),
.service-panel .button:not(.ghost),
.service-tool-card .button:not(.ghost),
.restore-card .button:not(.ghost),
.service-row .button:not(.ghost) {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff !important;
  border: 0;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.workspace-hero .button.ghost,
.service-panel .button.ghost,
.service-tool-card .button.ghost,
.restore-card .button.ghost,
.service-row .button.ghost {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #d5e2f0 !important;
}

.service-row .button.danger,
.service-panel .button.danger,
.service-tool-card .button.danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
}

.workspace-hero input,
.service-panel input,
.service-tool-card input,
.restore-card input,
.service-row input {
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #d6e2ef !important;
}

.workspace-hero input::placeholder,
.service-panel input::placeholder,
.service-tool-card input::placeholder,
.restore-card input::placeholder,
.service-row input::placeholder {
  color: #94a3b8 !important;
}

.inline-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px dashed #cbd8e6;
  color: #64748b !important;
}

.trash-row {
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.trash-row .file-primary strong {
  color: #991b1b !important;
}

@media (max-width: 1180px) {
  .service-overview-grid,
  .service-secondary-grid,
  .service-toolbar {
    grid-template-columns: 1fr;
  }

  .workspace-hero {
    flex-direction: column;
  }

  .workspace-hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .restore-card,
  .service-metric-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-metric-row strong {
    max-width: 100%;
    text-align: left;
  }

  .service-actions,
  .service-actions .inline-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .service-actions input[type="text"],
  .service-actions button,
  .service-actions .button {
    width: 100%;
    max-width: 100%;
  }

  .workspace-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 560px) {
  .workspace-hero,
  .service-panel,
  .service-tool-card {
    padding: 16px;
    border-radius: 20px;
  }

  .workspace-code,
  .workspace-plan-pill {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ===== SERVICE ACTIONS COMPACT LAYER ===== */

.service-item-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.service-main-action {
  min-width: 110px;
}

.service-more-actions {
  width: 100%;
  max-width: 280px;
  border: 1px solid #d8e3f1;
  border-radius: 16px;
  background: #f8fbff;
  overflow: hidden;
}

.service-more-actions summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: #334155;
  background: #eef4fb;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-more-actions summary::-webkit-details-marker {
  display: none;
}

.service-more-actions summary::after {
  content: "+";
  font-size: 1rem;
  font-weight: 900;
  color: #46618b;
}

.service-more-actions[open] summary {
  border-bottom-color: #d8e3f1;
}

.service-more-actions[open] summary::after {
  content: "−";
}

.service-more-actions-body {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
}

.service-action-form {
  display: grid;
  gap: 8px;
}

.service-action-form input[type="text"] {
  display: block !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.service-action-form .button {
  width: 100%;
}

@media (max-width: 860px) {
  .service-item-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .service-main-action,
  .service-more-actions {
    width: 100%;
    max-width: 100%;
  }
}


/* ===== BACKUP & RESTORE PREMIUM LAYER ===== */

.service-secondary-grid .service-panel:first-child {
  background:
    radial-gradient(circle at top right, rgba(96,165,250,.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-color: #d5e4f5;
}

.service-secondary-grid .service-panel:first-child .service-panel-head h3,
.restore-grid + .service-panel-head h3,
.restore-card-main strong {
  color: #0f172a !important;
}

.service-secondary-grid .service-panel:first-child .service-panel-kicker {
  color: #3b82f6 !important;
}

.service-secondary-grid .service-panel:first-child .service-metric-row {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fd 100%);
  border-color: #deebf8;
}

.service-secondary-grid .service-panel:first-child .service-metric-row strong {
  color: #0f172a !important;
}

.service-secondary-grid .service-panel:first-child .service-action-strip {
  margin-top: 18px;
  padding-top: 4px;
}

.service-secondary-grid .service-panel:first-child .button:not(.ghost) {
  min-width: 180px;
  background: linear-gradient(135deg, #0f6bff 0%, #3b82f6 100%) !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.restore-grid {
  gap: 14px;
}

.restore-card {
  position: relative;
  padding: 18px 18px 18px 20px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #dfe9f5;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.restore-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb 0%, #60a5fa 100%);
}

.restore-card-main {
  gap: 6px;
}

.restore-card-main strong {
  font-size: 1rem;
  font-weight: 800;
}

.restore-card-main small {
  font-size: .88rem;
  color: #64748b !important;
}

.restore-card .button.ghost {
  min-width: 150px;
  background: #eff6ff !important;
  border-color: #cfe0f7 !important;
  color: #1e3a8a !important;
  font-weight: 800;
}

.restore-card .button.ghost:hover {
  background: #e0eeff !important;
}

.service-panel .service-metric-row span {
  display: inline-flex;
  align-items: center;
}

.service-panel .service-metric-row strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .service-secondary-grid .service-panel:first-child .button:not(.ghost),
  .restore-card .button.ghost {
    width: 100%;
    min-width: 0;
  }

  .restore-card {
    padding-left: 18px;
  }

  .restore-card::before {
    top: 10px;
    bottom: auto;
    left: 14px;
    right: 14px;
    width: auto;
    height: 4px;
  }
}


/* ===== FILE MANAGER PREMIUM LAYER ===== */

.service-panel[data-search-group="folders"],
.service-panel[data-search-group="files"] {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe4f0;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.service-panel[data-search-group="folders"] .service-panel-head,
.service-panel[data-search-group="files"] .service-panel-head {
  margin-bottom: 18px;
}

.service-panel[data-search-group="folders"] .service-panel-kicker,
.service-panel[data-search-group="files"] .service-panel-kicker {
  color: #3b82f6 !important;
}

.service-panel[data-search-group="folders"] .service-panel-head h3,
.service-panel[data-search-group="files"] .service-panel-head h3 {
  color: #0f172a !important;
}

.service-panel[data-search-group="folders"] .service-panel-head p,
.service-panel[data-search-group="files"] .service-panel-head p {
  color: #64748b !important;
}

.service-explorer-table {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  background: #ffffff;
}

.service-explorer-table .explorer-head {
  background: linear-gradient(180deg, #f3f7fc 0%, #edf3fa 100%);
  border-bottom: 1px solid #dbe4f0;
  padding: 14px 16px;
}

.service-explorer-table .explorer-head div {
  color: #334155 !important;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.service-row {
  position: relative;
  padding: 16px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf2f8 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.service-row:hover {
  background: #f8fbff !important;
  box-shadow: inset 0 0 0 1px #e1ebf7;
}

.service-row:last-child {
  border-bottom: 0 !important;
}

.service-row .explorer-name strong,
.service-row .file-primary strong {
  color: #0f172a !important;
  font-size: .98rem;
  font-weight: 800;
}

.service-row .file-primary small,
.service-row .explorer-line small,
.service-row small {
  color: #64748b !important;
  line-height: 1.45;
}

.service-row .explorer-name strong::before,
.service-row .file-primary strong::before {
  display: none;
}

.service-row[data-item-kind="folder"] .explorer-name strong,
.service-row[data-item-kind="folder"] .file-primary strong {
  color: #0f3d91 !important;
}

.service-row[data-item-kind="file"] .explorer-name strong,
.service-row[data-item-kind="file"] .file-primary strong {
  color: #0f172a !important;
}

.service-item-actions {
  justify-content: flex-end;
  align-items: flex-start;
}

.service-main-action {
  min-width: 112px;
  background: #eff6ff !important;
  border: 1px solid #cfe0f7 !important;
  color: #1d4ed8 !important;
  font-weight: 800;
}

.service-main-action:hover {
  background: #e2efff !important;
}

.service-more-actions {
  border-radius: 18px;
  border: 1px solid #d7e3f2;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.service-more-actions summary {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%);
  color: #334155 !important;
  font-weight: 800;
  padding: 13px 14px;
}

.service-more-actions summary:hover {
  background: linear-gradient(180deg, #f3f8ff 0%, #ebf3fb 100%);
}

.service-more-actions summary::after {
  color: #1d4ed8;
}

.service-more-actions-body {
  background: #ffffff;
  padding: 14px;
  gap: 12px;
}

.service-action-form {
  padding: 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e4edf7;
}

.service-action-form input[type="text"] {
  height: 42px;
  border-radius: 12px;
}

.service-action-form .button {
  min-height: 40px;
  border-radius: 12px;
}

.service-more-actions-body > .button {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
}

.service-action-form .button:not(.danger) {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
}

.service-action-form .button.danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
}

.file-row.selectable-row.service-row {
  border-radius: 18px !important;
  border: 1px solid #e2eaf4 !important;
  margin-bottom: 10px;
  padding: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.file-row.selectable-row.service-row:hover {
  background: #f8fbff !important;
  border-color: #cfe0f7 !important;
}

.file-row.selectable-row.service-row .service-item-actions {
  width: auto;
}

.inline-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  border: 1px dashed #cbd8e6;
  color: #64748b !important;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .service-explorer-table {
    border: 0;
    background: transparent;
  }

  .service-row {
    border-radius: 18px !important;
    border: 1px solid #e2eaf4 !important;
    margin-bottom: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  }
}

@media (max-width: 860px) {
  .service-item-actions {
    justify-content: stretch;
  }

  .service-main-action,
  .service-more-actions,
  .service-action-form .button {
    width: 100%;
    max-width: 100%;
  }

  .service-row {
    padding: 14px !important;
  }
}


/* ===== FILE MANAGER TOOLBAR PREMIUM LAYER ===== */

.service-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 4px;
}

.service-tool-card {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe4f0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.service-tool-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.service-tool-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a !important;
}

.service-tool-card .stack {
  gap: 12px;
}

.service-tool-card input[type="text"],
.service-tool-card input[type="file"] {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #d6e2ef !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.service-tool-card input[type="text"]::placeholder {
  color: #94a3b8 !important;
}

.service-tool-card input[type="text"]:focus,
.service-tool-card input[type="file"]:focus {
  border-color: #7eb0ff !important;
  box-shadow: 0 0 0 4px rgba(88,166,255,.12) !important;
}

.service-tool-card .button {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
}

.service-tool-card .button:not(.ghost) {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.service-tool-card .button.ghost {
  background: #eef4fb !important;
  color: #1e293b !important;
  border: 1px solid #d4e1ef !important;
}

.service-tool-card .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tool-card .badge {
  background: #eef4fb !important;
  color: #46607f !important;
  border: 1px solid #d9e5f2;
  font-weight: 800;
}

.service-tool-card .badge.is-neutral {
  background: #f3f7fc !important;
  color: #5b6b82 !important;
}

.service-tool-card[data-search-card],
.service-tool-card:last-child {
  background:
    radial-gradient(circle at top right, rgba(96,165,250,.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.service-tool-card:last-child::before {
  background: linear-gradient(90deg, #0f6bff 0%, #60a5fa 100%);
}

.service-tool-card:last-child input[data-item-filter],
.service-tool-card:last-child input[type="text"][data-item-filter] {
  min-height: 52px;
  padding: 0 14px;
  font-size: .98rem;
  font-weight: 600;
  white-space: nowrap;
}

.service-tool-card:last-child .inline-actions {
  align-items: center;
}

.service-tool-card:last-child .button.ghost[data-item-filter-clear] {
  min-width: 90px;
  width: auto;
}

@media (max-width: 1180px) {
  .service-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .service-tool-card {
    padding: 18px;
    border-radius: 20px;
  }

  .service-tool-card::before {
    left: 14px;
    right: 14px;
  }

  .service-tool-card .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .service-tool-card .badge,
  .service-tool-card .button.ghost[data-item-filter-clear] {
    width: 100%;
  }
}

/* ===== PORTAL SIDEBAR + TOPBAR PREMIUM LAYER ===== */

.portal-sidebar {
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(16,214,255,.14), transparent 28%),
    linear-gradient(180deg, #061226 0%, #04101f 52%, #030c17 100%) !important;
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.03), 18px 0 40px rgba(2,8,20,.18);
}

.portal-brand {
  padding: 6px 4px 2px;
}

.portal-brand-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, #16d6ff 0%, #2d7cff 100%) !important;
  box-shadow: 0 16px 28px rgba(45,124,255,.28);
}

.portal-brand .brand-top {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff !important;
  letter-spacing: .01em;
}

.portal-brand .brand-bottom {
  font-size: .9rem;
  color: #9db6de !important;
}

.portal-menu {
  gap: 10px;
}

.portal-menu-item {
  position: relative;
  min-height: 50px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #d9e7ff !important;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.03);
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.portal-menu-item:hover {
  transform: translateY(-1px);
  background: linear-gradient(90deg, rgba(52,119,255,.18), rgba(21,53,119,.12));
  border-color: rgba(123,174,255,.16);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

.portal-menu-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.28), rgba(29,78,216,.14));
  border-color: rgba(125,178,255,.24);
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 14px 26px rgba(0,0,0,.22);
}

.portal-menu-item.active::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5eead4 0%, #60a5fa 100%);
}

.portal-menu-ico {
  width: 24px;
  color: #9fd3ff;
}

.portal-menu-item.active .portal-menu-ico {
  color: #ffffff;
}

.portal-system-card {
  margin-top: 28px;
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34,211,238,.12), transparent 30%),
    linear-gradient(180deg, rgba(9,28,58,.92), rgba(6,19,39,.96));
  border: 1px solid rgba(122,170,255,.18);
  box-shadow: 0 18px 38px rgba(0,0,0,.24);
}

.portal-system-title {
  color: #ffffff !important;
  font-size: 1.08rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.portal-system-ok {
  color: #7bf7d0 !important;
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.portal-system-image {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.portal-topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%) !important;
  border: 1px solid #dbe4f0;
  box-shadow: 0 16px 34px rgba(15,23,42,.06);
}

.portal-topbar::after {
  content: "";
  position: absolute;
  inset: auto 20px 0 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,.3), transparent);
}

.portal-topbar-left,
.portal-topbar-right {
  min-width: 0;
}

.portal-page-title {
  font-size: 2rem;
  font-weight: 900;
  color: #0f172a !important;
  line-height: 1.08;
}

.portal-page-subtitle {
  margin-top: 6px;
  color: #64748b !important;
  font-weight: 600;
  white-space: nowrap;
}

.portal-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 16px;
}

.portal-user-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3f7fc 0%, #e8eef6 100%);
  border: 1px solid #dce6f2;
  color: #1e293b;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.portal-user-copy {
  min-width: 0;
}

.portal-user-welcome {
  color: #64748b !important;
  font-size: .9rem;
  font-weight: 700;
}

.portal-user-name {
  color: #0f172a !important;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.portal-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(37,99,235,.22);
}

.portal-content {
  background: linear-gradient(180deg, #edf1f6 0%, #e7edf4 100%) !important;
}

@media (max-width: 1100px) {
  .portal-sidebar {
    box-shadow: 18px 0 46px rgba(0,0,0,.34);
  }

  .portal-topbar {
    border-radius: 22px;
  }
}

@media (max-width: 760px) {
  .portal-topbar {
    padding: 18px;
    gap: 16px;
  }

  .portal-page-title {
    font-size: 1.45rem;
  }

  .portal-topbar-right {
    padding-left: 0;
    width: 100%;
  }

  .portal-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }
}

/* ===== CUSTOMER DASHBOARD PREMIUM LAYER ===== */

.portal-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15,23,42,.06) !important;
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.portal-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 1.22rem;
  font-weight: 900;
  color: #0f172a !important;
}

.portal-section-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef5ff 0%, #e3eefc 100%) !important;
  border: 1px solid #d7e4f4;
  color: #1d4ed8 !important;
  box-shadow: 0 8px 18px rgba(37,99,235,.08);
}

.portal-customer-meta {
  gap: 12px;
}

.portal-customer-line {
  padding: 14px 0;
  border-bottom: 1px solid #e6edf6;
  color: #0f172a !important;
}

.portal-customer-line strong {
  color: #0f172a !important;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.portal-label {
  color: #64748b !important;
  font-weight: 800;
}

.portal-storage-stack {
  gap: 12px;
}

.portal-storage-line {
  position: relative;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%) !important;
  border: 1px solid #dfe9f5 !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

.portal-storage-line span {
  color: #64748b !important;
  font-weight: 700;
}

.portal-storage-line strong {
  color: #0f172a !important;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.portal-storage-line.total {
  background: linear-gradient(135deg, #eef5ff 0%, #e4eefc 100%) !important;
  border-color: #d3e1f4 !important;
}

.portal-status-grid {
  gap: 14px;
}

.portal-status-item {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #f7fbf8 0%, #f1f9f4 100%) !important;
  border: 1px solid #d8ebde !important;
  color: #15803d !important;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(21,128,61,.05);
}

.portal-mini-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 136px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
}

.portal-mini-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #334155 !important;
  margin-bottom: 10px;
}

.portal-mini-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: #1d4ed8 !important;
  line-height: 1.05;
}

.portal-customer-card {
  background:
    radial-gradient(circle at top right, rgba(96,165,250,.08), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.portal-grid-bottom .portal-card::before,
.portal-mini-card::before {
  background: linear-gradient(90deg, #0f6bff 0%, #60a5fa 100%);
}

.portal-footer-bar {
  margin-top: 10px;
  padding: 12px 8px 2px;
  color: #475569 !important;
  font-weight: 800;
  gap: 20px;
}

.portal-footer-bar > div {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  border: 1px solid #d7e1ed;
}

@media (max-width: 1200px) {
  .portal-grid-2,
  .portal-status-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .portal-card {
    border-radius: 20px;
  }

  .portal-card::before {
    left: 14px;
    right: 14px;
  }

  .portal-section-title {
    font-size: 1.08rem;
  }

  .portal-mini-value {
    font-size: 1.8rem;
  }

  .portal-storage-line,
  .portal-customer-line {
    gap: 10px;
  }
}

/* ===== CUSTOMER DASHBOARD PREMIUM LAYER ===== */

.portal-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15,23,42,.06) !important;
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.portal-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 1.22rem;
  font-weight: 900;
  color: #0f172a !important;
}

.portal-section-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef5ff 0%, #e3eefc 100%) !important;
  border: 1px solid #d7e4f4;
  color: #1d4ed8 !important;
  box-shadow: 0 8px 18px rgba(37,99,235,.08);
}

.portal-customer-meta {
  gap: 12px;
}

.portal-customer-line {
  padding: 14px 0;
  border-bottom: 1px solid #e6edf6;
  color: #0f172a !important;
}

.portal-customer-line strong {
  color: #0f172a !important;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.portal-label {
  color: #64748b !important;
  font-weight: 800;
}

.portal-storage-stack {
  gap: 12px;
}

.portal-storage-line {
  position: relative;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%) !important;
  border: 1px solid #dfe9f5 !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

.portal-storage-line span {
  color: #64748b !important;
  font-weight: 700;
}

.portal-storage-line strong {
  color: #0f172a !important;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.portal-storage-line.total {
  background: linear-gradient(135deg, #eef5ff 0%, #e4eefc 100%) !important;
  border-color: #d3e1f4 !important;
}

.portal-status-grid {
  gap: 14px;
}

.portal-status-item {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #f7fbf8 0%, #f1f9f4 100%) !important;
  border: 1px solid #d8ebde !important;
  color: #15803d !important;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(21,128,61,.05);
}

.portal-mini-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 136px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
}

.portal-mini-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #334155 !important;
  margin-bottom: 10px;
}

.portal-mini-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: #1d4ed8 !important;
  line-height: 1.05;
}

.portal-customer-card {
  background:
    radial-gradient(circle at top right, rgba(96,165,250,.08), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.portal-grid-bottom .portal-card::before,
.portal-mini-card::before {
  background: linear-gradient(90deg, #0f6bff 0%, #60a5fa 100%);
}

.portal-footer-bar {
  margin-top: 10px;
  padding: 12px 8px 2px;
  color: #475569 !important;
  font-weight: 800;
  gap: 20px;
}

.portal-footer-bar > div {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  border: 1px solid #d7e1ed;
}

@media (max-width: 1200px) {
  .portal-grid-2,
  .portal-status-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .portal-card {
    border-radius: 20px;
  }

  .portal-card::before {
    left: 14px;
    right: 14px;
  }

  .portal-section-title {
    font-size: 1.08rem;
  }

  .portal-mini-value {
    font-size: 1.8rem;
  }

  .portal-storage-line,
  .portal-customer-line {
    gap: 10px;
  }
}

/* ===== PORTAL LAYOUT BALANCE TUNING ===== */

:root {
  --portal-sidebar-width: 320px;
  --portal-content-max: 1560px;
  --portal-gap: 22px;
}

.portal-shell {
  grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr) !important;
}

.portal-sidebar {
  width: var(--portal-sidebar-width);
  padding: 26px 22px 24px;
}

.portal-content {
  padding: 24px !important;
}

.portal-content > * {
  max-width: var(--portal-content-max);
}

.portal-topbar,
.portal-card,
.workspace-hero,
.service-panel,
.service-tool-card {
  margin-left: 0;
  margin-right: 0;
}

.portal-topbar {
  padding: 22px 26px;
  border-radius: 28px;
  margin-bottom: var(--portal-gap);
}

.portal-card {
  border-radius: 24px;
  margin-bottom: var(--portal-gap);
}

.workspace-hero,
.service-overview-grid,
.service-secondary-grid,
.service-toolbar,
.service-panel.top-gap {
  margin-bottom: var(--portal-gap);
}

.portal-grid,
.portal-grid-2,
.service-overview-grid,
.service-secondary-grid,
.service-toolbar,
.restore-grid {
  gap: var(--portal-gap);
}

.portal-menu-item {
  min-height: 52px;
  padding: 14px 16px 14px 18px;
}

.portal-system-card {
  margin-top: 30px;
}

.portal-page-title {
  letter-spacing: -0.02em;
}

.portal-page-subtitle {
  max-width: 760px;
}

.portal-topbar-right {
  margin-left: auto;
}

.portal-footer-bar {
  justify-content: flex-start;
}

@media (min-width: 1101px) {
  .portal-shell {
    background:
      linear-gradient(
        90deg,
        #04101f 0,
        #04101f var(--portal-sidebar-width),
        #e7edf4 var(--portal-sidebar-width),
        #e7edf4 100%
      ) !important;
  }

  .portal-shell::before {
    width: var(--portal-sidebar-width) !important;
  }
}

@media (max-width: 1400px) {
  :root {
    --portal-sidebar-width: 300px;
    --portal-content-max: 100%;
    --portal-gap: 20px;
  }

  .portal-content {
    padding: 20px !important;
  }
}

@media (max-width: 1100px) {
  :root {
    --portal-gap: 18px;
  }

  .portal-shell {
    grid-template-columns: 1fr !important;
  }

  .portal-sidebar {
    width: min(88vw, 320px);
  }

  .portal-content {
    padding: 16px !important;
  }

  .portal-topbar {
    padding: 18px 20px;
    border-radius: 24px;
  }

  .portal-card {
    border-radius: 22px;
  }
}

@media (max-width: 760px) {
  :root {
    --portal-gap: 16px;
  }

  .portal-content {
    padding: 14px !important;
  }

  .portal-topbar {
    padding: 16px 16px 18px;
    border-radius: 22px;
  }

  .portal-card,
  .workspace-hero,
  .service-panel,
  .service-tool-card {
    border-radius: 20px !important;
  }

  .portal-topbar-right {
    margin-left: 0;
  }

  .portal-footer-bar {
    justify-content: stretch;
  }
}

@media (max-width: 520px) {
  .portal-content {
    padding: 12px !important;
  }

  .portal-topbar {
    padding: 14px;
  }

  .portal-card {
    padding: 14px !important;
  }
}

/* ===== TERMS PAGE PREMIUM LAYER ===== */

.legal-page-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 28px !important;
  box-shadow: 0 18px 40px rgba(15,23,42,.06) !important;
}

.legal-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
}

.legal-side-block,
.legal-nav {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%);
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  padding: 20px;
}

.legal-kicker,
.legal-section-kicker {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.legal-title {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.08;
  color: #0f172a;
  font-weight: 900;
}

.legal-lead {
  margin: 12px 0 0;
  color: #64748b;
  line-height: 1.75;
}

.legal-meta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.legal-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2eaf4;
}

.legal-meta-row span {
  color: #64748b;
  font-weight: 700;
}

.legal-meta-row strong {
  color: #0f172a;
  font-weight: 900;
  text-align: right;
}

.legal-side-actions {
  margin-top: 16px;
}

.legal-nav {
  display: grid;
  gap: 8px;
}

.legal-nav a {
  padding: 11px 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2eaf4;
  color: #334155;
  font-weight: 700;
  transition: .16s ease;
}

.legal-nav a:hover {
  background: #eef5ff;
  border-color: #cfe0f7;
  color: #1d4ed8;
}

.legal-content {
  display: grid;
  gap: 18px;
}

.legal-section {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e2eaf4;
  box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.legal-section-head {
  margin-bottom: 14px;
}

.legal-section h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.22rem;
  font-weight: 900;
}

.legal-section p,
.legal-section li {
  color: #475569;
  line-height: 1.85;
}

.legal-section ul {
  margin: 0;
  padding-left: 20px;
}

.legal-contact-card {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dbe4f0;
  display: grid;
  gap: 8px;
  color: #475569;
}

.legal-contact-card strong {
  color: #0f172a;
}

@media (max-width: 1100px) {
  .legal-shell {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .legal-side-block,
  .legal-nav,
  .legal-section {
    border-radius: 18px;
    padding: 16px;
  }

  .legal-title {
    font-size: 1.45rem;
  }

  .legal-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== DOCUMENTS PAGE PREMIUM LAYER ===== */

.documents-hero {
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,247,255,.98)) !important;
  border: 1px solid #dbe4f0 !important;
  box-shadow: 0 14px 32px rgba(15,23,42,.06) !important;
}

.documents-card,
.documents-terms-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #dbe4f0 !important;
  box-shadow: 0 14px 30px rgba(15,23,42,.05) !important;
}

.documents-kicker {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.documents-terms-card .section-head h3,
.documents-card .section-head h3,
.documents-card h3 {
  color: #0f172a !important;
  font-weight: 900;
}

.documents-terms-card .muted,
.documents-card .muted {
  color: #64748b !important;
  line-height: 1.7;
}

.documents-terms-card .button {
  min-width: 220px;
}

.documents-row {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  border: 1px solid #e2eaf4 !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
}

.documents-row strong {
  color: #0f172a !important;
  font-weight: 800;
}

.documents-row small {
  color: #64748b !important;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .documents-terms-card .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .documents-terms-card .actions {
    width: 100%;
  }

  .documents-terms-card .button {
    width: 100%;
    min-width: 0;
  }
}

.plain-text {
  font-weight: 400 !important;
  color: #1e293b !important;
  line-height: 1.9;
  font-size: 0.95rem;
  white-space: pre-line;
}

.plain-text * {
  font-weight: 400 !important;
}
.menu-badge{margin-left:auto;min-width:24px;height:24px;padding:0 8px;border-radius:999px;background:#fff4de;color:#a36a00;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:.8rem}
.topbar-ticket-pill{text-decoration:none;white-space:nowrap}
.notice-list .file-row{align-items:center}



/* ===== Fixed white interface ===== */
:root{
  --portal-bg:#f3f7fc;
  --portal-bg-2:#edf3fa;
  --portal-surface:#ffffff;
  --portal-surface-soft:#f7faff;
  --portal-surface-strong:#eef3fb;
  --portal-text:#132238;
  --portal-text-soft:#5f7086;
  --portal-line:rgba(19,34,56,.10);
  --portal-line-strong:rgba(19,34,56,.16);
  --portal-accent:#2563eb;
  --portal-accent-2:#3b82f6;
  --portal-success:#0f9f6e;
  --portal-warning:#a86900;
  --portal-danger:#cb3f56;
  --portal-shadow:0 22px 50px rgba(28,50,84,.10);
}

body{
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.08) 0, transparent 23%),
    radial-gradient(circle at top right, rgba(59,130,246,.07) 0, transparent 18%),
    linear-gradient(180deg, var(--portal-bg-2) 0%, var(--portal-bg) 100%) !important;
  color:var(--portal-text) !important;
}

body, .content, .portal-content, .sidebar, .portal-sidebar,
.card, .portal-card, .service-panel, .workspace-hero, .hero.card, .topbar,
.portal-topbar, .portal-system-card, .customer-tile, .login-shell, .login-card,
.table-card, .inline-card, .restore-card, .file-row, .ticket-message,
.notice-list, .metric, .mini-stat, .portal-menu-item, .portal-user-copy,
.form-card, .panel, .box, .ticket-item, .docs-card, .alert{
  color:var(--portal-text) !important;
}

.portal-sidebar,
.sidebar,
.portal-system-card,
.portal-card,
.card,
.hero.card,
.service-panel,
.workspace-hero,
.portal-topbar,
.topbar,
.login-card,
.inline-card,
.restore-card,
.file-row,
.customer-tile,
.table-card,
.metric,
.mini-stat,
.ticket-message,
.notice-list .file-row{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.96)) !important;
  border:1px solid var(--portal-line) !important;
  box-shadow:var(--portal-shadow) !important;
}

.portal-topbar, .topbar, .workspace-hero{
  backdrop-filter:blur(18px);
}

.portal-page-title, .portal-user-name, .portal-system-title, .brand-top, .brand-bottom,
h1, h2, h3, h4, h5, h6, strong, .metric-value, .mini-stat-value,
.service-name, .table-title, .hero h2, .workspace-title, .portal-brand-icon + div{
  color:var(--portal-text) !important;
}

.portal-page-subtitle,
.portal-user-welcome,
.portal-system-ok,
.portal-label,
.tile-subhead,
.service-note,
.workspace-eyebrow,
.service-panel-kicker,
.service-metric-row span,
.muted,
small,
th,
.portal-storage-meta,
.portal-customer-line,
.breadcrumbs,
.help-text,
.ticket-meta,
.label-muted{
  color:var(--portal-text-soft) !important;
}

p, span, td, th, label, li, div, a:not(.button):not(.portal-menu-item):not(.status-pill):not(.menu-badge){
  color:inherit;
}

.portal-menu-item{
  border:1px solid transparent;
  background:transparent !important;
}
.portal-menu-item:hover,
.portal-menu-item.active{
  background:linear-gradient(135deg, rgba(37,99,235,.10), rgba(59,130,246,.06)) !important;
  border-color:rgba(37,99,235,.18) !important;
  color:var(--portal-text) !important;
}

.portal-user-avatar,
.portal-brand-icon,
.button, button{
  background:linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2)) !important;
  color:#fff !important;
}

.button.ghost,.link-btn,.workspace-hero .button.ghost{
  background:#fff !important;
  color:var(--portal-text) !important;
  border:1px solid var(--portal-line-strong) !important;
}
.link-btn.danger,.button.danger{
  color:var(--portal-danger) !important;
  border-color:rgba(203,63,86,.24) !important;
  background:rgba(203,63,86,.06) !important;
}

input,select,textarea{
  background:#fff !important;
  color:var(--portal-text) !important;
  border:1px solid var(--portal-line-strong) !important;
}
input::placeholder, textarea::placeholder{
  color:var(--portal-text-soft) !important;
}

.progress,
.service-progress{
  background:#e9f0fa !important;
}
.progress > div,
.service-progress-bar{
  background:linear-gradient(90deg, var(--portal-accent), var(--portal-success)) !important;
}

.status-pill{
  border:1px solid var(--portal-line-strong) !important;
}

.portal-footer-bar,
.breadcrumbs,
.metric,
.mini-stat,
.portal-storage-line,
.portal-customer-line,
.service-metric-row,
th, td{
  border-color:var(--portal-line) !important;
}

.realtime-dot{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:8px 12px;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:rgba(15,159,110,.08);
  color:var(--portal-text) !important;
  border:1px solid rgba(15,159,110,.18);
}
.realtime-dot::before{
  content:"";
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--portal-success);
  box-shadow:0 0 0 0 rgba(15,159,110,.30);
  animation:livePulse 1.8s infinite;
}
@keyframes livePulse{
  0%{box-shadow:0 0 0 0 rgba(15,159,110,.30)}
  70%{box-shadow:0 0 0 10px transparent}
  100%{box-shadow:0 0 0 0 transparent}
}

.tile-head-badges{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.portal-topbar-right{
  gap:12px !important;
  flex-wrap:wrap;
  justify-content:flex-end;
}

@media (max-width:900px){
  .portal-topbar-right{
    width:100%;
    justify-content:flex-start;
  }
}

/* ===== FORCE WHITE THEME BRAND + SIDEBAR FIX ===== */
.brand-top,
.brand-bottom,
.portal-brand .brand-top,
.portal-brand .brand-bottom,
.login-shell .brand-top,
.login-shell .brand-bottom,
.login-card .brand-top,
.login-card .brand-bottom,
.portal-system-title,
.portal-system-ok,
.portal-user-copy .brand-top,
.portal-user-copy .brand-bottom,
.portal-footer-bar,
.portal-footer-bar *,
.sidebar .brand-top,
.sidebar .brand-bottom,
.portal-sidebar .brand-top,
.portal-sidebar .brand-bottom{
  color:#0f172a !important;
}

.portal-sidebar,
.sidebar,
.portal-footer-bar,
.portal-shell::before{
  background:#ffffff !important;
  background-image:none !important;
}

.portal-sidebar,
.sidebar{
  border-right:1px solid rgba(15,23,42,.08) !important;
}

.portal-footer-bar{
  border-top:1px solid rgba(15,23,42,.08) !important;
  box-shadow:none !important;
}

@media (min-width: 1101px) {
  .portal-shell {
    background:#e7edf4 !important;
    background-image:none !important;
  }
}


/* ===== FILE MANAGER ACTION MENU FIX ===== */
.service-item-actions {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.service-main-action {
  min-height: 38px !important;
  padding: 9px 16px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.service-more-actions {
  position: relative;
  width: auto;
  min-width: 0;
  overflow: visible;
}

.service-more-actions-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d5dfeb;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.service-more-actions-toggle:hover,
.service-more-actions.is-open .service-more-actions-toggle {
  background: #f8fbff;
  border-color: #bfd2ea;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.service-more-actions-toggle:active {
  transform: scale(.98);
}

.service-more-actions-toggle > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.service-more-actions-toggle::after {
  content: "⋯";
  font-size: 22px;
  line-height: 1;
  margin-top: -3px;
  color: #1e3a8a;
}

.service-more-actions-body {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  width: 190px;
  max-width: min(190px, calc(100vw - 20px));
  max-height: min(70vh, 420px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  transform-origin: top right;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.service-more-actions-body[hidden] {
  display: none !important;
}

.service-more-actions-body > .button,
.service-more-actions-body .service-action-form,
.service-more-actions-body .service-action-form .button {
  width: 100%;
  box-sizing: border-box;
}

.service-more-actions-body > .button,
.service-more-actions-body .service-action-form .button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 32px;
  padding: 7px 11px;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: #0f172a !important;
  box-shadow: none !important;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.service-more-actions-body > .button:hover,
.service-more-actions-body .service-action-form .button:hover {
  background: #eef5ff !important;
  color: #0f172a !important;
}

.service-more-actions-body .service-action-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.service-more-actions-body .service-action-form + .service-action-form,
.service-more-actions-body > .button + .service-action-form,
.service-more-actions-body .service-action-form + .button {
  margin-top: 2px;
}

.service-more-actions-body .service-action-form input[type="text"] {
  display: none !important;
}

.service-more-actions-body .service-action-form .button.danger {
  color: #b91c1c !important;
}

.service-more-actions-body .service-action-form .button.danger:hover {
  background: #fff1f2 !important;
  color: #b91c1c !important;
}

.service-explorer-table,
.explorer-head,
.explorer-line,
.file-row,
.service-row,
.service-item-actions,
.service-more-actions,
.service-more-actions-body,
.service-action-form,
.service-action-form input,
.service-action-form button {
  box-sizing: border-box;
}

.service-explorer-table,
.service-panel,
.explorer-line,
.file-row.service-row {
  overflow: visible !important;
}

.explorer-line,
.file-row.service-row {
  min-width: 0;
}

.explorer-line > div,
.explorer-head > div,
.file-primary,
.service-item-actions {
  min-width: 0;
}

@media (max-width: 860px) {
  .service-item-actions {
    gap: 8px;
  }

  .service-main-action {
    min-height: 36px !important;
    padding: 8px 14px !important;
  }

  .service-more-actions-toggle {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .service-more-actions-body {
    width: min(190px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }
}

/* ===== CROSS-BROWSER LAYOUT STABILITY PATCH ===== */
html,
body {
  width: 100%;
  max-width: 100%;
}

body,
input,
select,
textarea,
button {
  -moz-osx-font-smoothing: grayscale;
}

button,
.button,
.link-btn,
.service-more-actions-toggle,
input,
select,
textarea {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.shell,
.portal-shell,
.content,
.portal-content,
.portal-topbar,
.portal-topbar-left,
.portal-topbar-right,
.workspace-hero,
.workspace-hero-main,
.workspace-hero-actions,
.service-overview-grid,
.service-secondary-grid,
.service-toolbar,
.service-panel,
.service-tool-card,
.service-breadcrumb-wrap,
.service-explorer-table,
.explorer-head,
.explorer-line,
.service-row,
.file-row,
.service-item-actions,
.file-primary,
.restore-card,
.breadcrumbs {
  min-width: 0;
  max-width: 100%;
}

.explorer-head,
.explorer-line {
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(88px, 120px)
    minmax(120px, 170px)
    minmax(140px, 1fr)
    minmax(160px, 210px);
}

.explorer-head > div,
.explorer-line > div,
.file-row > div,
.restore-card > div,
.portal-topbar-right > div,
.portal-topbar-left > div {
  min-width: 0;
}

.explorer-head > div,
.explorer-line > div,
.file-primary strong,
.file-primary small,
.workspace-title,
.portal-page-title,
.portal-page-subtitle,
.portal-user-name,
.portal-user-welcome,
.breadcrumbs,
.crumb,
.service-metric-row strong,
.service-metric-row span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workspace-hero-actions .button,
.workspace-hero-actions button,
.service-item-actions .button,
.service-item-actions button,
.service-action-strip .button,
.service-action-strip button,
.inline-actions .button,
.inline-actions button,
.portal-topbar-right .status-pill {
  width: auto;
  max-width: 100%;
}

.portal-topbar-right {
  align-items: center;
}

.portal-user-copy,
.portal-topbar-right,
.workspace-meta,
.workspace-hero-actions,
.service-action-strip,
.inline-actions,
.service-item-actions {
  flex-wrap: wrap;
}

.service-more-actions-body {
  right: auto;
}

@media (max-width: 1180px) {
  .service-overview-grid,
  .service-secondary-grid {
    grid-template-columns: 1fr;
  }

  .service-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .content,
  .portal-content {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .portal-topbar,
  .portal-topbar-left,
  .portal-topbar-right,
  .workspace-hero,
  .workspace-hero-main,
  .workspace-hero-actions,
  .restore-card,
  .file-row,
  .service-item-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .portal-topbar-right {
    justify-content: flex-start;
  }

  .service-toolbar {
    grid-template-columns: 1fr;
  }

  .explorer-head {
    display: none !important;
  }

  .explorer-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .service-item-actions {
    gap: 10px;
  }

  .service-item-actions .service-main-action,
  .service-item-actions .service-more-actions {
    width: 100%;
  }

  .service-item-actions .service-main-action,
  .service-item-actions .service-more-actions-toggle {
    justify-content: center;
  }

  .service-more-actions-body {
    width: min(220px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 560px) {
  .card,
  .portal-card,
  .service-panel,
  .service-tool-card,
  .workspace-hero,
  .restore-card,
  .file-row,
  .explorer-line {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .portal-page-title,
  .workspace-title {
    font-size: 1.2rem !important;
  }

  .workspace-meta,
  .workspace-hero-actions,
  .service-action-strip,
  .inline-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-hero-actions .button,
  .workspace-hero-actions button,
  .service-action-strip .button,
  .service-action-strip button,
  .inline-actions .button,
  .inline-actions button,
  .portal-topbar-right .status-pill {
    width: 100%;
  }
}

/* Finder-style file manager refinements */
.service-manager-app{
  display:grid;
  gap:18px;
}

.service-toolbar{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.service-tool-card{
  padding:18px;
  border-radius:22px;
  border:1px solid #dbe6f4;
  background:linear-gradient(180deg,#ffffff,#f7faff);
  box-shadow:0 12px 34px rgba(17,39,77,.06);
}

.service-tool-card h3{
  font-size:1rem;
  font-weight:800;
  color:#172644;
}

.finder-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.finder-nav{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px;
  border-radius:14px;
  background:linear-gradient(180deg,#f9fbff,#eef4ff);
  border:1px solid #d5e1f2;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

.finder-nav-button{
  width:38px;
  height:34px;
  border-radius:11px;
  border:1px solid #ccd8ea;
  background:linear-gradient(180deg,#ffffff,#eef4ff);
  color:#20385f;
  font-size:1.2rem;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 1px 0 rgba(255,255,255,.95),0 6px 14px rgba(18,44,89,.08);
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, opacity .16s ease;
}

.finder-nav-button:hover:not(:disabled){
  transform:translateY(-1px);
  border-color:#b7c9e4;
  box-shadow:0 1px 0 rgba(255,255,255,.95),0 10px 22px rgba(18,44,89,.12);
}

.finder-nav-button:disabled{
  cursor:not-allowed;
  opacity:.45;
  box-shadow:none;
  transform:none;
}

.service-panel{
  border-radius:24px;
}

.service-secondary-grid .service-panel,
.service-overview-grid .service-panel{
  box-shadow:0 18px 44px rgba(16,35,68,.06);
}

.service-breadcrumb-wrap{
  display:grid;
  gap:14px;
}

.service-action-strip{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.service-explorer-table{
  border-radius:22px;
  overflow:hidden;
  border:1px solid #dbe6f4;
  background:#fff;
  box-shadow:0 14px 36px rgba(17,39,77,.06);
}

.explorer-head{
  position:sticky;
  top:0;
  z-index:1;
  background:linear-gradient(180deg,#f8fbff,#eef4ff);
  border-bottom:1px solid #dbe6f4;
}

.explorer-line{
  min-height:74px;
  padding:14px 18px;
  border-bottom:1px solid #edf2f8;
  transition:background .16s ease, box-shadow .16s ease;
}

.explorer-line:last-child{
  border-bottom:none;
}

.explorer-line:hover,
.file-row:hover{
  background:#f8fbff;
}

.service-row.is-selected{
  background:#eef5ff;
}

.service-item-actions{
  justify-self:end;
}

.service-main-action{
  min-width:92px;
}

.service-more-actions-toggle{
  min-width:104px;
  justify-content:center;
}

.service-more-actions-body{
  min-width:250px;
  border-radius:18px;
  border:1px solid #dbe6f4;
  box-shadow:0 18px 44px rgba(16,35,68,.16);
  background:#fff;
  padding:12px;
}

.service-more-actions-body .button,
.service-more-actions-body .service-action-form{
  width:100%;
}

.service-more-actions-body .service-action-form{
  display:grid;
  gap:8px;
  margin-top:8px;
}

.service-more-actions-body .service-action-form:first-child{
  margin-top:0;
}

.service-more-actions-body input[type=text]{
  display:block;
  width:100%;
  min-width:0;
  border-radius:12px;
  border:1px solid #d2dceb;
  background:#f8fbff;
}

.service-panel-kicker{
  letter-spacing:.08em;
}

@media (max-width:1100px){
  .service-toolbar{
    grid-template-columns:1fr;
  }

  .finder-section-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width:760px){
  .finder-nav{
    width:100%;
    justify-content:flex-start;
  }

  .finder-nav-button{
    width:44px;
    height:38px;
  }

  .service-explorer-table{
    overflow:auto;
  }
}

/* ==== Service manager compact redesign ==== */
.sm-shell{display:flex;flex-direction:column;gap:12px}
.sm-hero-card{padding:18px 18px 14px;border:1px solid rgba(255,255,255,.08);border-radius:24px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.03));box-shadow:var(--softshadow)}
.sm-hero-main,.sm-manager-topbar,.sm-quickbar,.sm-status-strip{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sm-hero-copy{min-width:0;flex:1 1 460px}
.sm-hero-kicker,.sm-breadcrumb-label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.sm-hero-title{margin:6px 0 0;font-size:clamp(24px,4vw,34px);line-height:1.1}
.sm-hero-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.sm-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid rgba(255,255,255,.08);border-radius:999px;background:rgba(255,255,255,.04);font-size:13px;color:var(--text)}
.sm-hero-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.sm-status-strip{margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.08);align-items:stretch}
.sm-stat-card{min-width:130px;flex:1 1 130px;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06)}
.sm-stat-card span{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
.sm-stat-card strong{font-size:16px}
.sm-progress-wrap{min-width:220px;flex:2 1 260px;display:flex;align-items:center}
.service-progress.compact{width:100%;margin:0}
.sm-manager-panel{padding:14px 14px 16px;border-radius:24px}
.sm-breadcrumb-block{min-width:0;flex:1 1 340px}
.sm-breadcrumbs{margin-top:6px;flex-wrap:wrap;row-gap:6px}
.sm-nav-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sm-mini-button{padding:9px 13px;border-radius:12px;font-size:13px}
.sm-mini-button.is-active{background:linear-gradient(135deg,var(--blue),var(--blue-2));color:#fff;border-color:transparent}
.sm-quickbar{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.08);align-items:center}
.sm-view-switch{display:flex;gap:8px;align-items:center}
.sm-inline-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.sm-inline-form input[type="text"],.sm-inline-form input[type="file"],.sm-search-box input{min-height:42px;padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:rgba(11,16,32,.7);color:var(--text)}
.sm-upload-form input[type="file"]{max-width:230px}
.sm-search-box{margin-left:auto;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sm-search-box input{width:min(320px,100%)}
.sm-search-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sm-list-wrap{display:flex;flex-direction:column;gap:14px}
.sm-file-section{padding:12px;border:1px solid rgba(255,255,255,.06);border-radius:22px;background:rgba(255,255,255,.03)}
.sm-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.sm-section-head h3{margin:3px 0 0}
.sm-section-note{font-size:12px;color:var(--muted)}
.sm-explorer-table{display:grid;gap:8px}
.sm-explorer-head,.sm-explorer-row{display:grid;grid-template-columns:minmax(220px,1.8fr) minmax(90px,.7fr) minmax(140px,1fr) auto;align-items:center;gap:12px}
.sm-explorer-head{padding:0 12px 6px;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.sm-explorer-row{padding:12px;border:1px solid rgba(255,255,255,.06);border-radius:18px;background:rgba(7,16,27,.48)}
.sm-item-main{min-width:0;display:flex;flex-direction:column;gap:5px}
.sm-item-link{display:flex;flex-direction:column;gap:5px;min-width:0;text-decoration:none;color:inherit;padding:2px 0;border-radius:12px;outline:none}
.sm-item-link:hover,.sm-item-link:focus-visible{color:inherit;text-decoration:none}
.sm-item-link:focus-visible{box-shadow:0 0 0 2px rgba(110,168,255,.35)}
.sm-item-main strong,.file-primary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-item-main small,.file-primary small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
.sm-actions-cell{justify-content:flex-end}
.sm-action-toggle{min-width:42px;padding:10px 12px;border-radius:12px}
.sm-action-menu{width:min(280px,calc(100vw - 24px))}
.sm-classic-row{padding:12px 14px;border-radius:18px}
.sm-details-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.sm-detail-card{padding:14px 14px 16px}
.sm-detail-card summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between}
.sm-detail-card summary::-webkit-details-marker{display:none}
.sm-detail-card summary h3{margin:4px 0 0}
.sm-detail-card summary::after{content:'+';font-size:22px;color:var(--muted)}
.sm-detail-card[open] summary::after{content:'−'}
@media (max-width: 1100px){
  .sm-details-grid{grid-template-columns:1fr}
  .sm-search-box{margin-left:0;width:100%}
  .sm-search-box input{width:100%}
}
@media (max-width: 820px){
  .sm-explorer-head{display:none}
  .sm-explorer-row{grid-template-columns:1fr;align-items:flex-start}
  .sm-actions-cell{justify-content:flex-start;width:100%;display:flex;flex-wrap:wrap;gap:8px}
  .sm-inline-form,.sm-search-box,.sm-view-switch{width:100%}
  .sm-inline-form input[type="text"],.sm-inline-form input[type="file"],.sm-inline-form button,.sm-search-box input{width:100%}
  .sm-manager-panel{padding:12px}
  .sm-file-section{padding:10px}
  .service-item-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .service-item-actions .service-main-action{flex:1 1 140px;min-width:140px}
  .service-item-actions .service-more-actions{flex:0 0 auto}
  .service-item-actions .service-more-actions-toggle{min-width:42px;width:42px}
  .service-more-actions-body{max-width:calc(100vw - 16px)}
}


.sm-upload-form{align-items:stretch}
.sm-upload-picker{position:relative;display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:58px;min-width:min(300px,100%);padding:12px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.1);background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.03));cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
.sm-upload-picker:hover{border-color:rgba(110,168,255,.38);transform:translateY(-1px)}
.sm-upload-picker.is-disabled{opacity:.6;cursor:not-allowed;transform:none}
.sm-upload-picker-label{font-size:13px;font-weight:700;color:var(--text)}
.sm-upload-picker-meta{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.sm-upload-picker input[type="file"]{position:absolute;inset:0;opacity:0;cursor:pointer;max-width:none;width:100%;height:100%}
.sm-upload-queue{display:flex;flex-direction:column;gap:10px;width:100%;margin-top:10px}
.sm-upload-item{padding:12px 14px;border-radius:20px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));box-shadow:var(--softshadow)}
.sm-upload-item-head,.sm-upload-item-meta{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sm-upload-item-name{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-upload-item-percent{font-size:13px;font-weight:800;color:var(--muted)}
.sm-upload-item-meta{margin-top:6px;font-size:12px;color:var(--muted)}
.sm-upload-progress{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:10px}
.sm-upload-progress-bar{width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#53a5ff,#2f6fff);transition:width .18s ease,background .22s ease}
.sm-upload-item.is-success .sm-upload-progress-bar{background:linear-gradient(90deg,#33c46b,#13964b)}
.sm-upload-item.is-error .sm-upload-progress-bar{background:linear-gradient(90deg,#ff8b8b,#e04f5f)}
.sm-upload-item.is-success .sm-upload-item-percent{color:#56d28a}
.sm-upload-item.is-error .sm-upload-item-percent{color:#ff9e9e}
.sm-toast-stack{position:fixed;right:18px;bottom:18px;display:flex;flex-direction:column;gap:10px;z-index:4000;pointer-events:none;max-width:min(360px,calc(100vw - 24px))}
.sm-toast{padding:13px 15px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:rgba(14,20,33,.96);box-shadow:0 18px 42px rgba(0,0,0,.28);color:#f6fbff;opacity:0;transform:translateY(12px) scale(.98);transition:opacity .2s ease,transform .2s ease}
.sm-toast.is-visible{opacity:1;transform:translateY(0) scale(1)}
.sm-toast.is-success{border-color:rgba(76,196,116,.28)}
.sm-toast.is-error{border-color:rgba(235,97,97,.28)}
@media (max-width: 820px){
  .sm-upload-picker{min-width:100%}
  .sm-upload-item-head,.sm-upload-item-meta{align-items:flex-start;flex-direction:column}
  .sm-toast-stack{left:12px;right:12px;bottom:12px;max-width:none}
}


/* Service picker */
.service-switcher-hero {
  padding-top: 18px;
  overflow: hidden;
}
.mac-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 22px;
}
.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.55), 0 1px 2px rgba(15, 23, 42, 0.18);
}
.mac-dot.red { background: #ff5f57; }
.mac-dot.amber { background: #febc2e; }
.mac-dot.green { background: #28c840; }
.mac-window-title {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
}
.service-switcher-shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.service-switcher-shell h2 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 2vw, 32px);
}
.service-switcher-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 14px;
  min-width: min(100%, 340px);
}
.picker-stat {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.picker-stat span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}
.picker-stat strong {
  font-size: 16px;
}
.picker-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 320px);
}
.picker-search span {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}
.picker-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.service-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.service-picker-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-picker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  border-color: rgba(59, 130, 246, 0.24);
}
.service-picker-card.is-recent {
  border-color: rgba(59, 130, 246, 0.32);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.12);
}
.service-picker-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.service-picker-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.service-picker-title-row h4 {
  margin: 0;
  font-size: 20px;
}
.picker-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.service-picker-actions {
  display: flex;
  justify-content: flex-start;
}
.service-picker-empty {
  text-align: center;
}
@media (max-width: 900px) {
  .service-switcher-shell,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .service-switcher-meta {
    grid-template-columns: 1fr;
  }
}


.service-card.is-unavailable,
.service-picker-card.is-unavailable {
  opacity: 0.72;
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.service-card.is-unavailable:hover,
.service-picker-card.is-unavailable:hover {
  transform: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  border-color: rgba(148, 163, 184, 0.3);
}
.button.disabled,
button.button:disabled,
.button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.sm-bulk-toolbar{padding:12px 14px;border:1px solid rgba(255,255,255,.06);border-radius:20px;background:rgba(255,255,255,.03)}
.sm-bulk-toolbar-main{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sm-bulk-toolbar-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sm-bulk-selection-meta{font-size:12px;line-height:1.4;color:rgba(255,255,255,.72);padding:0 2px}
.sm-item-check{display:flex;align-items:center;justify-content:center}
.label-reset{margin:0}
.sm-select-check{position:relative;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;cursor:pointer}
.sm-select-check input{position:absolute;opacity:0;pointer-events:none}
.sm-select-check span{display:block;width:18px;height:18px;border-radius:6px;border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.04);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.sm-select-check input:checked + span{background:rgba(110,168,255,.22);border-color:rgba(110,168,255,.72)}
.sm-select-check input:checked + span::after{content:'';position:absolute;left:7px;top:4px;width:5px;height:9px;border:solid #d9e9ff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.sm-explorer-head,.sm-explorer-row{grid-template-columns:44px minmax(220px,1.8fr) minmax(90px,.7fr) minmax(140px,1fr) auto}
.sm-explorer-row.is-checked{border-color:rgba(110,168,255,.42);background:rgba(25,52,92,.32)}
@media (max-width: 820px){
  .sm-bulk-toolbar-main,.sm-bulk-toolbar-group{width:100%}
  .sm-bulk-toolbar-group form{width:100%}
}

/* ===== MOBILE ACTION MENU VISIBILITY PATCH ===== */
@media (max-width: 820px) {
  .sm-explorer-head {
    display: none !important;
  }

  .sm-explorer-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 12px !important;
  }

  .sm-explorer-row > div {
    min-width: 0 !important;
  }

  .sm-item-check {
    justify-content: flex-start !important;
  }

  .sm-item-main,
  .sm-item-link,
  .sm-item-main strong,
  .sm-item-main small {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sm-actions-cell,
  .service-item-actions {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .service-main-action {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: calc(100% - 52px) !important;
    text-align: center !important;
  }

  .service-more-actions {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 44px !important;
    max-width: none !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .service-more-actions-toggle {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
  }

  .service-more-actions-body,
  .sm-action-menu {
    width: min(220px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
  }
}


/* ===== MOBILE FILE MANAGER ACTION BUTTON HARD FIX ===== */
@media (max-width: 1100px) {
  .service-explorer-table .sm-explorer-head {
    display: none !important;
  }

  .service-explorer-table .sm-explorer-row {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: flex-start !important;
    min-height: 96px !important;
    padding: 16px 64px 16px 16px !important;
  }

  .service-explorer-table .sm-item-check {
    justify-content: flex-start !important;
    order: 1 !important;
  }

  .service-explorer-table .sm-item-main {
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .service-explorer-table .sm-explorer-row > div:not(.sm-item-check):not(.sm-item-main):not(.sm-actions-cell) {
    order: 3 !important;
    width: 100% !important;
  }

  .service-explorer-table .sm-actions-cell,
  .service-explorer-table .service-item-actions {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    order: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
    z-index: 3 !important;
  }

  .service-explorer-table .service-main-action {
    display: none !important;
  }

  .service-explorer-table .service-more-actions {
    position: relative !important;
    flex: 0 0 auto !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .service-explorer-table .service-more-actions-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 14px !important;
  }

  .service-explorer-table .service-more-actions-body,
  .service-explorer-table .sm-action-menu {
    width: min(220px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
  }
}


.evidence-layout{grid-template-columns:minmax(280px,360px) minmax(0,1fr);align-items:start}.evidence-list-row{display:flex;text-decoration:none;color:inherit}.evidence-list-row.selected{border:1px solid rgba(59,130,246,.28);background:rgba(239,246,255,.85)}.evidence-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}.inset-card{background:rgba(248,250,252,.72)}.compact-table .file-row{padding:10px 0}.align-start{align-items:flex-start}.evidence-detail-card textarea,.evidence-detail-card input{width:100%}.evidence-detail-card label{display:grid;gap:8px;font-size:13px;color:#334155;font-weight:600}.evidence-detail-card textarea{border:1px solid rgba(15,23,42,.10);border-radius:14px;padding:12px 13px;font:inherit;min-height:84px;background:#fff}.evidence-detail-card textarea:focus{outline:none;border-color:rgba(37,99,235,.35);box-shadow:0 0 0 4px rgba(59,130,246,.12)}@media (max-width: 980px){.evidence-layout{grid-template-columns:1fr}.evidence-search-row{grid-template-columns:1fr}.evidence-list-card{order:2}.evidence-detail-card{order:1}}

/* Dashboard spreadsheet refresh */
body{color:#dfe8fb;}
.content.portal-content{padding:24px 24px 28px;}
.card h3,.card h4,.card h5,.card p,.card .muted,.card label,.card small,.card .small,.card strong,.card span,.card div{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;}
.dashboard-sheet-hero{padding:20px 22px;border-radius:22px;}
.sheet-metrics-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:18px;}
.sheet-metric{padding:16px 18px;border-radius:20px;background:linear-gradient(180deg,#ffffff,#f6f9ff);box-shadow:0 10px 26px rgba(19,43,82,.08);margin-bottom:0;}
.sheet-metric span{display:block;font-size:12px;color:#64748b;font-weight:700;text-transform:uppercase;letter-spacing:.05em;}
.sheet-metric strong{display:block;font-size:24px;color:#0f172a;margin-top:8px;line-height:1.1;}
.sheet-table{border:1px solid #dbe4f0;border-radius:18px;overflow:hidden;background:#fff;}
.sheet-table-head,.sheet-table-row{display:grid;align-items:center;gap:10px;padding:10px 12px;font-size:12.5px;}
.sheet-table-head{background:linear-gradient(180deg,#eef4ff,#e7efff);font-weight:800;color:#36527f;text-transform:uppercase;letter-spacing:.04em;}
.sheet-table-row{background:#fff;border-top:1px solid #edf2f8;color:#1e293b;}
.sheet-table-row:nth-child(even){background:#fbfdff;}
.sheet-table-row:hover{background:#f7fbff;}
.sheet-table-row strong{font-size:12.5px;color:#0f172a;}
.sheet-table-row small{font-size:11px;color:#64748b;margin-top:2px;}
.sheet-table-empty{padding:18px;font-size:12.5px;color:#64748b;background:#fff;}
.sheet-table-grid-admin{grid-template-columns:1.35fr 1.2fr .55fr .55fr 1fr .55fr .55fr 1.15fr;}
.sheet-table-grid-alerts{grid-template-columns:1.7fr .4fr .55fr;}
.sheet-table-grid-tickets{grid-template-columns:1.5fr 1fr .8fr .8fr .45fr .55fr;}
.sheet-table-grid-customer-summary{grid-template-columns:.75fr 1.25fr .75fr 1.25fr;}
.sheet-table-grid-storage{grid-template-columns:1fr 1.2fr;}
.sheet-table-grid-services{grid-template-columns:1.35fr .8fr .75fr .8fr .9fr .55fr;}
.sheet-form{padding:14px;border:1px solid #e3eaf4;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 8px 18px rgba(15,23,42,.05);}
.sheet-form-title{font-size:13px;font-weight:800;color:#0f172a;margin-bottom:4px;}
.compact-form input,.compact-form select,.compact-form textarea,.compact-editor input,.compact-editor select{padding:10px 12px;border-radius:12px;font-size:12.5px;}
.compact-form button,.compact-editor button,.sheet-table .button,.sheet-table .link-btn{min-height:38px;padding:9px 12px;border-radius:12px;font-size:12px;}
.dashboard-form-grid{align-items:start;}
.dashboard-inline-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:680px;overflow:auto;padding-right:4px;}
.compact-editor{padding:12px;border-radius:16px;background:#fbfdff;}
.compact-editor-head{display:flex;justify-content:space-between;gap:8px;align-items:center;}
.soft-pill-success{background:#e8fbf0;color:#1f8d53;}
.soft-pill-danger{background:#ffe7e7;color:#bc3b3b;}
.portal-card,.portal-customer-card,.portal-mini-card{background:linear-gradient(180deg,#fff,#f7faff);color:#16233f;border:1px solid rgba(223,231,243,.95);border-radius:22px;padding:20px;box-shadow:0 12px 28px rgba(16,36,70,.08);}
.portal-section-title,.portal-storage-line,.portal-customer-line,.portal-mini-title,.portal-mini-value{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;}
.portal-section-title{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:800;color:#0f172a;}
.portal-section-ico{width:32px;height:32px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#eef4ff,#dff8ee);color:#295189;}
.portal-grid{display:grid;gap:16px;}
.portal-grid-2{grid-template-columns:repeat(2,minmax(0,1fr));}
.portal-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));}
.portal-grid-bottom{margin-top:16px;}
.portal-footer-bar{display:flex;justify-content:flex-end;color:#94a3b8;font-size:12px;padding:10px 4px 0;}
.portal-status-item{padding:10px 12px;border-radius:14px;background:#f6f9ff;border:1px solid #e3ebf6;color:#28415f;font-size:12.5px;font-weight:700;}
.topbar-ticket-pill{align-self:center;}
@media (max-width:1400px){.sheet-metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:1100px){.sheet-metrics-grid,.dashboard-inline-grid,.portal-grid-2,.portal-grid-3{grid-template-columns:1fr;} .sheet-table-grid-admin,.sheet-table-grid-alerts,.sheet-table-grid-tickets,.sheet-table-grid-customer-summary,.sheet-table-grid-storage,.sheet-table-grid-services{grid-template-columns:1fr;} .sheet-table-head{display:none;} .sheet-table-row{padding:12px;}}


/* ===== COMPACT SHEET LAYER: services / tickets / documents ===== */
.sheet-page{display:grid;gap:14px}
.sheet-page .card,.sheet-page .portal-card{border-radius:18px;box-shadow:0 8px 22px rgba(19,43,82,.06)}
.sheet-page .section-head h3,.sheet-page h2,.sheet-page h3,.sheet-page h4{font-size:1rem;line-height:1.35}
.sheet-page .muted,.sheet-page small,.sheet-page label,.sheet-page .small,.sheet-page .tile-subhead{font-size:12px;line-height:1.45}
.sheet-kicker{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#6d7f9c;font-weight:800;margin-bottom:6px}
.sheet-hero{padding:16px 18px}
.sheet-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.sheet-search-row input[type="search"],.sheet-search-row input[type="text"]{min-height:42px;border-radius:14px;font-size:13px;padding:10px 12px}
.sheet-count{font-size:12px;color:#60718d;font-weight:700}
.sheet-grid{display:grid;gap:10px}
.sheet-grid.two{grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr)}
.sheet-table{display:grid;gap:8px}
.sheet-head,.sheet-line{display:grid;grid-template-columns:minmax(200px,1.5fr) 120px 140px minmax(140px,1fr) 120px;gap:12px;align-items:start}
.sheet-head{padding:10px 14px;border-radius:14px;background:#edf4ff;border:1px solid #d7e5fb;color:#314b77;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sheet-line{padding:12px 14px;border:1px solid #e3eaf4;border-radius:16px;background:#fbfdff;box-shadow:0 4px 12px rgba(18,37,71,.03)}
.sheet-line:hover{border-color:#c8d9f5;background:#f8fbff}
.sheet-line strong{display:block;font-size:13px;line-height:1.45;color:#15233d;overflow-wrap:anywhere}
.sheet-line small{display:block;font-size:12px;color:#687a95;line-height:1.45;overflow-wrap:anywhere}
.sheet-cell-actions{display:flex;justify-content:flex-end;align-items:flex-start;gap:8px;flex-wrap:wrap}
.sheet-tag-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.sheet-tag{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:999px;background:#f1f5fb;border:1px solid #dde7f4;color:#43607f;font-size:11px;font-weight:800}
.sheet-stack{display:grid;gap:10px}
.sheet-form .form-grid{gap:10px}
.sheet-form input,.sheet-form select,.sheet-form textarea{font-size:13px;border-radius:14px;min-height:42px}
.sheet-form textarea{min-height:110px}
.sheet-side-card{padding:16px 18px}
.sheet-side-card .metric{padding:8px 0}
.sheet-side-card .metric span,.sheet-side-card .metric strong{font-size:12px}
.sheet-side-card .metric strong{font-weight:800;color:#14213a}
.sheet-ticket-thread{display:grid;gap:10px}
.sheet-ticket-message{padding:13px 14px;border-radius:14px;border:1px solid #e2eaf4;background:#fbfdff}
.sheet-ticket-message .ticket-message-body{font-size:12px;line-height:1.65;padding:12px;border-radius:12px}
.sheet-list-card .file-row,.sheet-list-card .documents-row,.sheet-list-card .service-picker-card{border-radius:16px}
.sheet-service-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.sheet-service-grid .service-picker-card{padding:14px;border:1px solid #dfe8f4;background:linear-gradient(180deg,#ffffff,#f7fbff);box-shadow:0 6px 16px rgba(18,37,71,.04)}
.sheet-service-grid .service-picker-card h4{font-size:14px}
.sheet-service-grid .mini-stat{padding:10px 12px;border-radius:14px}
.sheet-service-grid .mini-stat span{font-size:11px}
.sheet-service-grid .mini-stat strong{font-size:12px}
.sheet-service-grid .metric{padding-top:8px;font-size:12px}
.documents-list .documents-row,.tickets-list .sheet-line{align-items:center}
.compact-chip{display:inline-flex;align-items:center;padding:0 9px;height:24px;border-radius:999px;background:#eef4ff;border:1px solid #d7e5fb;color:#365988;font-size:11px;font-weight:800}

@media (max-width:1100px){
  .sheet-grid.two{grid-template-columns:1fr}
  .sheet-head{display:none}
  .sheet-line{grid-template-columns:1fr}
  .sheet-cell-actions{justify-content:flex-start}
}
@media (max-width:760px){
  .sheet-search-row{grid-template-columns:1fr}
  .sheet-cell-actions .button,.sheet-cell-actions .link-btn,.sheet-cell-actions button{width:100%}
}

/* ===== COMPLIANCE FONT STYLE FOR DOCS ===== */

.docs-compact,
.docs-compact * {
  font-size: 13px !important;
  line-height: 1.5;
  font-weight: 600;
}

.docs-compact h1,
.docs-compact h2,
.docs-compact h3 {
  font-size: 15px !important;
  font-weight: 800;
}

.docs-compact small {
  font-size: 12px !important;
  color: #6b7280;
}

.docs-compact .button {
  font-size: 12px !important;
  padding: 6px 10px !important;
}

/* ===== TICKETS EXCEL-LIKE GRID ===== */

.tickets-page .tickets-list{
  padding:18px;
}

.tickets-page .tickets-list h3{
  font-size:15px;
  font-weight:800;
  margin:0;
}

.tickets-page .tickets-list .muted{
  font-size:12px;
  line-height:1.45;
}

.tickets-page .sheet-search-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.tickets-page .sheet-search-row input[type="search"]{
  min-height:40px;
  padding:8px 12px;
  font-size:12px;
  border-radius:10px;
}

.tickets-page .sheet-grid{
  display:grid;
  gap:0;
  border:1px solid #d9e2ef;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  margin-top:14px;
}

.tickets-page .sheet-grid-head,
.tickets-page .sheet-grid-row{
  display:grid;
  grid-template-columns:90px minmax(260px,1.8fr) 120px 120px 140px minmax(160px,1fr);
  gap:0;
  align-items:stretch;
}

.tickets-page .sheet-grid-head{
  background:#eef3f9;
  border-bottom:1px solid #d9e2ef;
}

.tickets-page .sheet-grid-head > div{
  padding:10px 12px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:#46566f;
  border-right:1px solid #d9e2ef;
}

.tickets-page .sheet-grid-head > div:last-child{
  border-right:none;
}

.tickets-page .sheet-grid-row{
  background:#fff;
}

.tickets-page .sheet-grid-row:nth-child(even){
  background:#fbfdff;
}

.tickets-page .sheet-grid-row:hover{
  background:#f4f8ff;
}

.tickets-page .sheet-grid-row > div{
  padding:10px 12px;
  font-size:12px;
  color:#1f2d3d;
  border-right:1px solid #e3eaf4;
  border-bottom:1px solid #e3eaf4;
  display:flex;
  align-items:center;
  min-width:0;
}

.tickets-page .sheet-grid-row > div:last-child{
  border-right:none;
}

.tickets-page .sheet-grid-row:last-child > div{
  border-bottom:none;
}

.tickets-page .sheet-grid-row strong{
  font-size:12px;
  font-weight:700;
  color:#16233f;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.tickets-page .sheet-grid-row small{
  font-size:11px;
  color:#6b7a90;
  line-height:1.45;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.tickets-page .sheet-tag-list,
.tickets-page .hero-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tickets-page .status-pill{
  font-size:11px;
  padding:6px 10px;
}

.tickets-page .sheet-grid-row .actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tickets-page .sheet-grid-row .button,
.tickets-page .sheet-grid-row .link-btn,
.tickets-page .sheet-grid-row button{
  min-height:34px;
  padding:7px 10px;
  font-size:11px;
  border-radius:10px;
}

@media (max-width: 1100px){
  .tickets-page .sheet-grid-head,
  .tickets-page .sheet-grid-row{
    grid-template-columns:1fr;
  }

  .tickets-page .sheet-grid-head{
    display:none;
  }

  .tickets-page .sheet-grid-row{
    border-bottom:1px solid #dfe6f2;
  }

  .tickets-page .sheet-grid-row > div{
    border-right:none;
    padding:9px 12px;
  }
}

/* ===== CUSTOMER DASHBOARD STORAGE FONT = COMPLIANCE ===== */

.portal-storage-line{
  padding: 12px 14px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.portal-storage-line span{
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

.portal-storage-line strong{
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 800 !important;
  color: #16233f !important;
}

.portal-storage-stack{
  gap: 10px !important;
}

.tickets-page .sheet-cell-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.tickets-page .sheet-cell-actions .button,
.tickets-page .sheet-cell-actions .link-btn{
  min-width:88px;
  min-height:36px;
  padding:8px 12px;
  font-size:12px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.ticket-details-table{
  display:grid;
  gap:0;
  border:1px solid #d9e2ef;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}

.ticket-details-table .explorer-head,
.ticket-details-table .explorer-line{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:0;
  align-items:stretch;
}

.ticket-details-table .explorer-head{
  background:#eef3f9;
  border:none;
  border-bottom:1px solid #d9e2ef;
  border-radius:0;
  padding:0;
}

.ticket-details-table .explorer-head > div{
  padding:10px 12px;
  border-right:1px solid #d9e2ef;
  font-size:11px;
  font-weight:800;
  color:#46566f;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.ticket-details-table .explorer-head > div:last-child{
  border-right:none;
}

.ticket-details-table .explorer-line{
  background:#fff;
  border:none;
  border-radius:0;
  padding:0;
}

.ticket-details-table .explorer-line:nth-child(even){
  background:#fbfdff;
}

.ticket-details-table .explorer-line:hover{
  background:#f4f8ff;
  box-shadow:none;
}

.ticket-details-table .explorer-line > div{
  padding:10px 12px;
  border-right:1px solid #e3eaf4;
  border-bottom:1px solid #e3eaf4;
  display:flex;
  align-items:center;
  min-width:0;
  font-size:12px;
  color:#1f2d3d;
}

.ticket-details-table .explorer-line > div:last-child{
  border-right:none;
}

.ticket-details-table .explorer-line:last-child > div{
  border-bottom:none;
}

.ticket-details-table strong{
  font-size:12px;
  font-weight:700;
  color:#16233f;
}

.ticket-details-table .status-pill{
  font-size:11px;
  padding:6px 10px;
}

@media (max-width: 760px){
  .ticket-details-table .explorer-head,
  .ticket-details-table .explorer-line{
    grid-template-columns:1fr;
  }

  .ticket-details-table .explorer-head{
    display:none;
  }

  .ticket-details-table .explorer-line{
    border-bottom:1px solid #dfe6f2;
  }

  .ticket-details-table .explorer-line > div{
    border-right:none;
  }
}