/* Area 3 V259.41 - One UI inspired Night Mode surface system
   Goal: near-black page canvas, borderless raised sections, clearer typography,
   simple circular section icons, and accessible contrast. Day mode is preserved. */

html[data-theme="dark"] body,
html[data-theme="dark"] body .app{
  background:#08090a!important;
  color:#f5f5f7!important;
  font-family:"SamsungOne","Samsung Sans",Roboto,"Segoe UI",Arial,sans-serif!important;
  font-size:15px;
  line-height:1.5;
}
html[data-theme="dark"] body .topbar,
html[data-theme="dark"] body header.topbar{
  background:#101011!important;
  border:0!important;
  box-shadow:none!important;
}

/* Primary section surfaces: separation comes from tone + spacing, not borders. */
html[data-theme="dark"] body :is(
  .section-card,.detail-card,.compact-panel,.report-panel-v31,
  .activity-master-v18413,.activity-group-v18413,.inventory-modal,
  .remarks-section-v163,.doc-section-v19,.status-timeline-section-v9,
  .dashboard-card,.dashboard-section,.inventory-dashboard-card,
  .filter-card,.filters-card,.filter-panel,.search-panel,
  .linimasa-card,.timeline-item,.note-card,.contract-card,
  .procurement-card,.summary-card,.metric-card
){
  background:#1b1b1d!important;
  border:0!important;
  box-shadow:none!important;
}

/* Preserve intentional colored heroes. */
html[data-theme="dark"] body :is(
  .task-read-hero-v25938,.detail-report-hero-v31,.equipment-report-hero-v40,
  .area3-purple-inventory-hero-v25934,.inventory-detail-purple-hero-v25935,
  .vendor-stock-detail-hero-v25934,.vmi-detail-hero-v25934
){
  border:0!important;
  box-shadow:none!important;
}

/* Secondary/nested surfaces. */
html[data-theme="dark"] body :is(
  .task-read-info-grid-v25938>div,.task-read-description-v25938,
  .task-read-update-grid-v25938>div,.task-read-kpi-row-v25938>div,
  .task-read-equipment-v25938>a,.task-read-docs-v25938>a,
  .task-read-remarks-v25938 article,.report-kpi-grid-v31>div,
  .report-soft-box-v40,.bubble,.thumb-card,.doc-card-v19,
  .status-timeline-card-v9,.activity-summary,.activity-board,
  .equipment-note-card-v25941,.area3-preview-card-v25941,
  .area3-read-list-item-v25941,.area3-kpi-v25941,
  .task-equipment-grid>a,.linked-task-title-card-v7,
  .dashboard-filter-box,.dashboard-filter,.dashboard-legend-row
){
  background:#242426!important;
  border:0!important;
  box-shadow:none!important;
}

/* Samsung/ChatGPT-like inputs: flat dark fill; focus provides the only strong outline. */
html[data-theme="dark"] body :is(input,select,textarea,.tox-tinymce,.tox .tox-toolbar-overlord,.tox .tox-edit-area__iframe){
  background-color:#252527!important;
  color:#f5f5f7!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body :is(input,select,textarea):focus{
  outline:none!important;
  box-shadow:0 0 0 2px rgba(64,145,255,.58)!important;
}
html[data-theme="dark"] body input::placeholder,
html[data-theme="dark"] body textarea::placeholder{color:#85858b!important;opacity:1!important}
html[data-theme="dark"] body select option{background:#252527!important;color:#f5f5f7!important}

/* Text hierarchy. */
html[data-theme="dark"] body :is(h1,h2,h3,h4,h5,h6,strong,b){color:#f7f7f8!important}
html[data-theme="dark"] body :is(.meta,small,.muted,.help,.hint,.subtext,.description-secondary){color:#a6a6ab!important}
html[data-theme="dark"] body a:not(.btn):not(.navlink):not(.logout){color:#76b7ff!important}

/* Clean tables: no boxed grid, only subtle horizontal separators. */
html[data-theme="dark"] body table{border:0!important;border-collapse:collapse!important;background:transparent!important}
html[data-theme="dark"] body table thead th{
  background:#27292e!important;
  color:#f6f7fb!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body table tbody td{
  background:transparent!important;
  color:#ededf0!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.065)!important;
}
html[data-theme="dark"] body table tbody tr:last-child td{border-bottom:0!important}
html[data-theme="dark"] body table tbody tr:hover td{background:#222225!important}

/* Flat cards should feel separate through spacing/radius rather than outlines. */
html[data-theme="dark"] body :is(.section-card,.compact-panel,.detail-card,.report-panel-v31){border-radius:14px!important}
html[data-theme="dark"] body :is(.task-read-section-v25938,.area3-read-section-v25941){border-radius:14px!important}
html[data-theme="dark"] body .task-read-section-v25938{background:#1b1b1d!important;border:0!important}
html[data-theme="dark"] body .task-section-editor-v25938{background:#242426!important;border:0!important}
html[data-theme="dark"] body .task-inline-form-v25938{border-top:0!important}

/* Generic section heading icon: simple line glyph in a darker circular chip. */
html[data-theme="dark"] body :is(
  .section-card>h3,.compact-panel>h3,.report-panel-v31>h3,
  .task-read-section-head-v25938 h3,.equipment-activity-head-v25936 h3,
  .area3-section-title-v25941
){
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
html[data-theme="dark"] body :is(
  .section-card>h3,.compact-panel>h3,.report-panel-v31>h3,
  .task-read-section-head-v25938 h3,.equipment-activity-head-v25936 h3,
  .area3-section-title-v25941
)::before{
  content:"";
  width:30px;height:30px;min-width:30px;
  border-radius:50%;
  background-color:#2a2a2d;
  background-repeat:no-repeat;
  background-position:center;
  background-size:16px 16px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236caeff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E");
}
html[data-theme="dark"] body :is(.remarks-section-v163,#sectionRemarksV25938) h3::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236caeff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E")!important;
}
html[data-theme="dark"] body :is(.doc-section-v19,#sectionDocsV25938) h3::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236caeff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.6 12 21a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7L9.2 18.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E")!important;
}
html[data-theme="dark"] body :is(.status-timeline-section-v9,#sectionActivityV25938,.equipment-activity-head-v25936) h3::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236caeff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")!important;
}
html[data-theme="dark"] body #sectionPicV25938 h3::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236caeff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E")!important;
}

/* Buttons adopt flat Samsung-like shape. */
html[data-theme="dark"] body .btn{
  border:0!important;
  box-shadow:none!important;
  border-radius:10px!important;
  font-weight:700!important;
}
html[data-theme="dark"] body .btn.primary{background:#3286d8!important;color:#fff!important}
html[data-theme="dark"] body .btn.secondary{background:#2b2b2e!important;color:#f5f5f7!important}
html[data-theme="dark"] body .btn.danger{background:#d83b43!important;color:#fff!important}

/* Remove legacy dashed/boxed separators from common editors. */
html[data-theme="dark"] body :is(fieldset,.compact-details,.activity-tool-v18412,.area3-doc-form-v178){border:0!important}
html[data-theme="dark"] body hr{border:0!important;border-top:1px solid rgba(255,255,255,.07)!important}

@media(max-width:900px){
  html[data-theme="dark"] body{font-size:16px}
  html[data-theme="dark"] body :is(.section-card,.compact-panel,.detail-card,.report-panel-v31,.task-read-section-v25938,.area3-read-section-v25941){border-radius:12px!important}
  html[data-theme="dark"] body :is(.section-card>h3,.compact-panel>h3,.report-panel-v31>h3,.task-read-section-head-v25938 h3,.equipment-activity-head-v25936 h3,.area3-section-title-v25941)::before{width:28px;height:28px;min-width:28px;background-size:15px 15px}
}

/* Wrappers and progress blocks should not reintroduce boxed outlines. */
html[data-theme="dark"] body :is(
  .task-read-table-wrap-v25938,.inventory-stock-wrap-v171,.inventory-table-wrap,
  .activity-table-wrap-v6,.equipment-notes-table-wrap-v222,.status-timeline-table-desktop-v9,
  .task-read-progress-v25938>div,.report-two-col-v40>div,.thumb-grid,.doc-grid-v19
){border:0!important;box-shadow:none!important}

/* Typography + section icon language is shared by Day and Night mode. */
body{font-family:"SamsungOne","Samsung Sans",Roboto,"Segoe UI",Arial,sans-serif!important}
body :is(
  .section-card>h3,.compact-panel>h3,.report-panel-v31>h3,
  .task-read-section-head-v25938 h3,.equipment-activity-head-v25936 h3,
  .area3-section-title-v25941
){display:flex!important;align-items:center!important;gap:10px!important}
body :is(
  .section-card>h3,.compact-panel>h3,.report-panel-v31>h3,
  .task-read-section-head-v25938 h3,.equipment-activity-head-v25936 h3,
  .area3-section-title-v25941
)::before{
  content:"";width:30px;height:30px;min-width:30px;border-radius:50%;
  background-color:#eef5ff;background-repeat:no-repeat;background-position:center;background-size:16px 16px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233286d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E");
}
body :is(.remarks-section-v163,#sectionRemarksV25938) h3::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233286d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E")!important}
body :is(.doc-section-v19,#sectionDocsV25938) h3::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233286d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.6 12 21a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7L9.2 18.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E")!important}
body :is(.status-timeline-section-v9,#sectionActivityV25938,.equipment-activity-head-v25936) h3::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233286d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")!important}
body #sectionPicV25938 h3::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233286d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E")!important}
html[data-theme="dark"] body :is(
  .section-card>h3,.compact-panel>h3,.report-panel-v31>h3,
  .task-read-section-head-v25938 h3,.equipment-activity-head-v25936 h3,
  .area3-section-title-v25941
)::before{background-color:#2a2a2d}
