
:root{
  --red:#c20d17;
  --red2:#9b0710;
  --redSoft:#fff0f2;
  --ink:#111827;
  --muted:#667085;
  --line:#e6e9ef;
  --bg:#f6f7f9;
  --card:#fff;
  --soft:#f8fafc;
  --shadow:0 18px 60px rgba(16,24,40,.08);
  --shadow2:0 8px 26px rgba(16,24,40,.055);
  --radius:16px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--ink)}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font-family:inherit}
img{display:block;max-width:100%}
.hidden{display:none!important}
.required{color:var(--red)}
.small{font-size:12px;color:var(--muted)}
.alert{padding:12px 14px;border-radius:12px;margin-bottom:16px;font-size:14px;font-weight:700}
.alert-error{background:#fff1f2;color:#991b1b;border:1px solid #fecdd3}
.alert-ok{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0}
.alert-info{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.mt-18{margin-top:18px}

/* Buttons */
.btn{
  height:42px;
  padding:0 17px;
  border-radius:10px;
  border:1px solid transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  transition:.18s;
  letter-spacing:.01em;
}
.btn-red{background:var(--red);color:#fff;box-shadow:0 10px 20px rgba(194,13,23,.16)}
.btn-red:hover{background:var(--red2)}
.btn-light{background:#fff;border-color:#d8dee8;color:#111827}
.btn-soft{background:var(--redSoft);border-color:#f0c1c6;color:var(--red)}
.btn-danger{background:#fff;border-color:#fecdd3;color:#b91c1c}
.btn-wide{width:100%;height:50px}

/* Fields */
.field{
  width:100%;
  height:45px;
  border:1px solid #d9dee7;
  background:#fff;
  border-radius:9px;
  padding:0 13px;
  outline:none;
  font-size:13px;
}
textarea.field{height:auto;padding-top:12px;resize:vertical}
.field:focus{border-color:var(--red);box-shadow:0 0 0 4px rgba(194,13,23,.08)}
label{font-size:12px;font-weight:900;display:block;margin-bottom:7px;color:#344054}
.input-row{margin-bottom:14px}
.readonly{background:#f5f6f8;color:#667085}

/* Install */
.install-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:34px;background:linear-gradient(180deg,#fff,#f6f7f9)}
.install-card{width:min(760px,96vw);background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);padding:30px}
.install-head{display:flex;align-items:center;gap:18px;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:22px}
.install-head img{height:60px;width:auto}
.install-head h1{font-size:25px;margin:0 0 6px}
.install-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 22px}

/* Login - matches mockup */
.login-body{background:#fff}
.login-page{
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 1.15fr;
  background:#fff;
}
.login-art{
  position:relative;
  overflow:hidden;
  border-right:1px solid var(--line);
  background:
    radial-gradient(circle at 20% 96%, rgba(194,13,23,.12), transparent 30%),
    linear-gradient(180deg,#fff,#fbfbfc);
  display:flex;
  align-items:center;
  justify-content:center;
}
.login-art:before{
  content:"";
  position:absolute;
  inset:-10% -30% auto -30%;
  height:120%;
  background:
    repeating-radial-gradient(ellipse at 0% 100%, rgba(194,13,23,.08) 0 1px, transparent 1px 10px);
  opacity:.55;
  transform:rotate(-8deg);
}
.login-panel-wrap{
  position:relative;
  z-index:2;
  width:440px;
  text-align:center;
}
.login-logo-big{width:245px;margin:0 auto 22px}
.login-title{font-size:13px;font-weight:900;letter-spacing:.08em;color:#111827;margin-bottom:4px}
.login-subtitle{font-size:13px;font-weight:900;letter-spacing:.07em;color:#111827;margin-bottom:36px}
.login-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:32px 28px 28px;
  text-align:left;
}
.login-card h2{font-size:18px;text-align:center;margin:0 0 8px;font-weight:900}
.login-card p{text-align:center;margin:0 0 22px;color:var(--muted);font-size:12px}
.login-row{position:relative;margin-bottom:16px}
.login-row .field{height:50px;padding-left:40px}
.login-row .ico{position:absolute;left:14px;top:15px;color:#344054;font-size:14px}
.login-footer{position:absolute;bottom:34px;left:0;right:0;text-align:center;font-size:11px;color:#98a2b3}

/* App shell */
.app-shell{min-height:100vh;display:grid;grid-template-columns:232px minmax(0,1fr);background:var(--bg)}
.sidebar{
  background:#fff;
  border-right:1px solid var(--line);
  min-height:100vh;
  padding:92px 18px 24px;
  position:relative;
}
.side-nav{display:flex;flex-direction:column;gap:7px}
.side-nav a{
  height:46px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 14px;
  border-radius:10px;
  font-size:13px;
  font-weight:900;
  color:#344054;
}
.side-nav a:hover,.side-nav a.active{background:#fce8ea;color:var(--red)}
.nav-ico{
  width:18px;height:18px;border:1.8px solid currentColor;border-radius:5px;
  display:inline-flex;align-items:center;justify-content:center;font-size:10px;flex:0 0 auto;
}
.side-spacer{height:1px;background:var(--line);margin:20px 0}
.workspace{min-width:0}
.topbar{
  height:74px;
  background:#fff;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 34px;
  box-shadow:0 4px 14px rgba(16,24,40,.035);
  position:sticky;
  top:0;
  z-index:10;
}
.top-logo{height:48px;width:auto;max-width:230px}
.top-user{display:flex;align-items:center;gap:16px;font-size:12px;font-weight:900;color:#344054}
.top-user a{color:var(--red)}
.main{max-width:1180px;margin:0 auto;padding:32px 30px 60px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:24px}
.page-head h1{font-size:30px;margin:0 0 7px;font-weight:900;letter-spacing:-.03em}
.page-head p{margin:0;font-size:13px;color:var(--muted)}
.breadcrumb{font-size:12px;font-weight:900;color:#667085;margin-bottom:16px}
.head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* Dashboard */
.folder-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.folder-card{
  min-height:255px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow2);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:28px;
  transition:.18s;
}
.folder-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:#f0c1c6}
.folder-graphic{width:152px;height:112px;position:relative;margin:0 auto 20px}
.folder-tab{position:absolute;left:24px;top:0;width:92px;height:40px;border-radius:15px 15px 4px 4px;background:linear-gradient(180deg,#e91b26,#b60d17)}
.folder-body{
  position:absolute;left:0;top:30px;width:152px;height:82px;border-radius:16px 16px 18px 18px;
  background:linear-gradient(180deg,#ee1d2a,#b60d17);
  box-shadow:0 18px 32px rgba(194,13,23,.25), inset 0 -15px 0 rgba(0,0,0,.08);
  display:flex;align-items:center;justify-content:center;
}
.folder-body img{width:56px;height:56px;border-radius:50%;background:#fff;padding:5px}
.folder-card h2{font-size:20px;font-weight:900;margin:0 0 10px}
.folder-count{font-size:13px;font-weight:900;color:var(--red);margin-bottom:20px}
.summary-grid{margin-top:26px;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.summary-card{height:108px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow2);display:flex;align-items:center;gap:18px;padding:0 22px}
.summary-icon{width:38px;height:38px;border-radius:12px;background:var(--redSoft);color:var(--red);display:flex;align-items:center;justify-content:center;font-weight:900}
.summary-num{font-size:26px;font-weight:900;margin-bottom:3px}
.summary-label{font-size:12px;color:var(--muted);font-weight:800}

/* Folder List */
.folder-table-wrap{
  background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow2);padding:24px;
}
.list-toolbar{display:flex;gap:16px;align-items:center;margin-bottom:20px}
.search-box{position:relative;flex:1}
.search-box .field{padding-left:40px}
.search-box span{position:absolute;left:14px;top:13px;color:#667085}
.sort-select{width:150px}
.leads-table{width:100%;border-collapse:collapse}
.leads-table th{font-size:11px;color:#344054;text-transform:uppercase;text-align:left;padding:14px 12px;border-bottom:1px solid var(--line)}
.leads-table td{font-size:13px;padding:18px 12px;border-bottom:1px solid #eef1f5;vertical-align:middle}
.leads-table tr:last-child td{border-bottom:0}
.table-action{width:38px;height:38px;border:1px solid #f0c1c6;border-radius:9px;color:var(--red);display:inline-flex;align-items:center;justify-content:center;background:#fff}
.company-title{font-weight:900}
.company-sub{font-size:11px;color:var(--muted);margin-top:4px}
.empty-panel{text-align:center;padding:46px;color:#667085;font-weight:800}
.table-footer{display:flex;justify-content:space-between;align-items:center;margin-top:20px;font-size:12px;color:#667085;font-weight:800}

/* Details */
.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:22px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow2);overflow:hidden}
.card-inner{padding:24px}
.card-title{display:flex;align-items:center;gap:12px;font-size:20px;font-weight:900;margin:0 0 22px}
.info-title{font-size:12px;font-weight:900;text-transform:uppercase;color:#344054;border-bottom:2px solid var(--red);display:inline-block;padding-bottom:8px;margin-bottom:12px}
.info-table{width:100%;border-collapse:collapse}
.info-table th,.info-table td{font-size:13px;padding:10px 0;border-bottom:1px solid #eef1f5;text-align:left;vertical-align:top}
.info-table th{width:205px;color:#344054;font-weight:900}
.card-actions{border-top:1px solid var(--line);background:#fbfcfe;padding:18px 24px;display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.attach-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.attach-list{display:flex;flex-direction:column;gap:12px}
.attach-item{border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;grid-template-columns:42px 1fr 72px;gap:12px;align-items:center}
.file-ico{width:38px;height:42px;border:1px solid #f0c1c6;border-radius:9px;display:flex;align-items:center;justify-content:center;color:var(--red);font-size:10px;font-weight:900;background:#fff}
.file-name{font-size:13px;font-weight:900}
.file-meta{font-size:11px;color:#667085;margin-top:4px}

/* Modals */
.modal-overlay{position:fixed;inset:0;background:rgba(16,24,40,.50);display:none;align-items:center;justify-content:center;padding:28px;z-index:999}
.modal-overlay.active{display:flex}
.modal{background:#fff;border-radius:18px;box-shadow:0 30px 100px rgba(0,0,0,.32);width:min(900px,96vw);max-height:92vh;overflow:auto}
.modal-wide{width:min(980px,96vw)}
.modal-preview{width:min(760px,96vw)}
.modal-head{height:62px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}
.modal-title{font-size:14px;font-weight:900;text-transform:uppercase}
.modal-close{border:0;background:transparent;font-size:26px;cursor:pointer;color:#344054}
.modal-body{padding:24px}
.modal-foot{padding:18px 24px;border-top:1px solid var(--line);background:#fbfcfe;display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.entry-modal-grid{display:grid;grid-template-columns:190px 1fr;min-height:560px}
.modal-side{border-right:1px solid var(--line);background:#fbfcfe;padding:22px 18px}
.modal-side-item{height:52px;border-radius:12px;display:flex;align-items:center;gap:10px;padding:0 14px;font-size:13px;font-weight:900;color:#344054;margin-bottom:8px}
.modal-side-item.active{background:var(--redSoft);color:var(--red)}
.grid-form{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px}
.full{grid-column:1/-1}
.upload-zone{min-height:104px;border:1px dashed #bcc6d3;border-radius:12px;background:#fbfcfe;display:flex;align-items:center;justify-content:center;text-align:center;color:#667085;font-size:12px;padding:14px}
.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.choice-btn{height:72px;border:1px solid var(--line);border-radius:14px;background:#fff;font-weight:900;cursor:pointer}
.choice-btn:hover{background:#fff7f7;border-color:#f0c1c6;color:var(--red)}
.preview-layout{display:grid;grid-template-columns:minmax(0,1.2fr) 260px;gap:26px}
.preview-box{min-height:330px;border:1px solid var(--line);border-radius:12px;background:#f4f6f8;display:flex;align-items:center;justify-content:center;overflow:hidden}
.preview-box img{max-height:520px;object-fit:contain}
.preview-box iframe{width:100%;height:520px;border:0;background:#fff}
.file-info div{display:grid;grid-template-columns:110px 1fr;gap:8px;border-bottom:1px solid #eef1f5;padding:11px 0;font-size:13px}
.file-info strong{font-weight:900;color:#344054}

/* Print preview/report */
.report-page{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow2);padding:34px;max-width:760px;margin:0 auto}
.report-head{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:22px}
.report-logo{height:58px;width:auto}
.report-title{text-align:right}
.report-title h2{margin:0 0 6px;font-size:21px}
.confidential{font-size:10px;color:var(--red);font-weight:900;text-transform:uppercase}
.report-table{width:100%;border-collapse:collapse;margin-top:12px}
.report-table th,.report-table td{font-size:13px;text-align:left;padding:9px 0;border-bottom:1px solid #eef1f5;vertical-align:top}
.report-table th{width:205px;color:#344054}
.report-section{font-size:12px;font-weight:900;text-transform:uppercase;margin:22px 0 10px}
.report-foot{border-top:1px solid var(--line);padding-top:18px;margin-top:22px;display:flex;justify-content:space-between;font-size:11px;color:#667085;font-weight:800}
.print-source{display:none}

@media print{
  .app-shell,.modal-overlay,.no-print{display:none!important}
  .print-source{display:block!important}
  .report-page{box-shadow:none;border:0;max-width:none;border-radius:0;padding:0}
  body{background:#fff}
  @page{size:A4;margin:14mm}
}
@media(max-width:1050px){
  .login-page{grid-template-columns:1fr}
  .app-shell{grid-template-columns:1fr}
  .sidebar{min-height:auto;padding:18px;position:relative}
  .topbar{position:relative}
  .folder-grid,.summary-grid,.detail-layout,.preview-layout,.grid-form,.choice-grid,.install-grid{grid-template-columns:1fr}
  .entry-modal-grid{grid-template-columns:1fr}
  .modal-side{border-right:0;border-bottom:1px solid var(--line)}
  .leads-table{min-width:800px}
  .folder-table-wrap{overflow-x:auto}
}


/* ===== ESSENSOS PROFESSIONAL VISUAL HOTFIX ===== */
.main{
  max-width:1420px!important;
  padding:34px 42px 70px!important;
}
.app-shell{
  grid-template-columns:250px minmax(0,1fr)!important;
}
.sidebar{
  padding-left:22px!important;
  padding-right:22px!important;
}
.topbar{
  padding-left:42px!important;
  padding-right:42px!important;
}
.folder-table-wrap,
.card,
.folder-card,
.summary-card{
  border-radius:20px!important;
}
.folder-table-wrap{
  padding:28px!important;
}
.leads-table th{
  font-size:12px!important;
  letter-spacing:.03em!important;
}
.leads-table td{
  font-size:14px!important;
}
.table-action{
  width:auto!important;
  min-width:72px!important;
  padding:0 14px!important;
  height:38px!important;
  border-radius:10px!important;
  font-size:12px!important;
  font-weight:900!important;
  color:var(--red)!important;
  background:var(--redSoft)!important;
  border-color:#f0c1c6!important;
}
.nav-ico{
  border:none!important;
  border-radius:0!important;
  position:relative!important;
  width:20px!important;
  height:20px!important;
}
.nav-dashboard:before{
  content:"";
  position:absolute;
  left:2px;
  top:5px;
  width:16px;
  height:13px;
  border:2px solid currentColor;
  border-radius:4px;
}
.nav-dashboard:after{
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:10px;
  height:10px;
  border-left:2px solid currentColor;
  border-top:2px solid currentColor;
  transform:rotate(45deg);
}
.nav-folder:before{
  content:"";
  position:absolute;
  left:1px;
  top:7px;
  width:18px;
  height:12px;
  border-radius:4px;
  background:currentColor;
}
.nav-folder:after{
  content:"";
  position:absolute;
  left:3px;
  top:4px;
  width:9px;
  height:5px;
  border-radius:4px 4px 0 0;
  background:currentColor;
}
.nav-logout:before{
  content:"";
  position:absolute;
  left:2px;
  top:3px;
  width:12px;
  height:14px;
  border:2px solid currentColor;
  border-radius:4px;
}
.nav-logout:after{
  content:"→";
  position:absolute;
  right:-2px;
  top:1px;
  font-weight:900;
  font-size:17px;
}
.modal{
  width:min(1180px,96vw)!important;
}
.modal-preview{
  width:min(1080px,96vw)!important;
}
.preview-layout{
  grid-template-columns:minmax(0,1.4fr) 300px!important;
}
.preview-box{
  min-height:520px!important;
  background:#fff!important;
}
.preview-box img{
  max-height:680px!important;
  width:auto!important;
  max-width:100%!important;
}
.file-missing{
  color:#991b1b!important;
  background:#fff1f2!important;
  border:1px dashed #fecdd3!important;
  padding:22px!important;
  border-radius:14px!important;
  text-align:center!important;
  font-weight:900!important;
  line-height:1.7!important;
}
.btn-missing{
  background:#fff1f2!important;
  color:#991b1b!important;
  border-color:#fecdd3!important;
}
.detail-layout{
  grid-template-columns:minmax(0,1fr) 430px!important;
}
.page-head h1{
  font-size:34px!important;
}
.report-page{
  max-width:880px!important;
}
@media(max-width:1050px){
  .app-shell{grid-template-columns:1fr!important}
  .main{padding:24px!important}
  .detail-layout,.preview-layout{grid-template-columns:1fr!important}
}


/* ===== REAL SVG ICON SYSTEM ===== */
.svg-icon{
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:currentColor;
}
.svg-icon svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.1;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.side-nav .svg-icon{
  width:20px;
  height:20px;
  opacity:.95;
}
.side-nav .svg-icon svg{
  width:20px;
  height:20px;
}
.nav-ico,
.nav-dashboard,
.nav-folder,
.nav-logout{
  display:none!important;
}
.top-user-inline{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.top-user-inline .svg-icon{
  width:18px;
  height:18px;
}
.login-row .ico{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:20px!important;
  height:20px!important;
  top:15px!important;
}
.login-row .ico .svg-icon,
.login-row .ico .svg-icon svg{
  width:18px!important;
  height:18px!important;
}
.search-box span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  top:13px!important;
}
.search-box .svg-icon,
.search-box .svg-icon svg{
  width:18px!important;
  height:18px!important;
}
.summary-icon{
  width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#fff7f8,#fff1f2)!important;
  border:1px solid #f3c5ca!important;
  color:var(--red)!important;
}
.summary-icon .svg-icon,
.summary-icon .svg-icon svg{
  width:22px!important;
  height:22px!important;
}
.side-nav a{
  gap:13px!important;
}
.side-nav a.active .svg-icon,
.side-nav a:hover .svg-icon{
  color:var(--red)!important;
}
.folder-card{
  min-height:285px!important;
}
.summary-grid{
  gap:22px!important;
}
.summary-card{
  height:120px!important;
  padding:0 26px!important;
}
