/*
 * ITR SCA Portal — Category / Case List Styles (FTR13)
 */

#itr-sca-category-list {
  --itr-teal:        #1B6B7B;
  --itr-teal-light:  #e8f4f6;
  --itr-teal-dark:   #145462;
  --itr-text:        #1a1a2e;
  --itr-muted:       #666;
  --itr-border:      #d0dde0;
  --itr-bg:          #ffffff;
  --itr-radius:      6px;
  --itr-radius-lg:   12px;
  --itr-font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --itr-success:     #008939;
  --itr-warning:     #654205;

  font-family: var(--itr-font);
  color: var(--itr-text);
  margin: 0 auto;
  padding: 28px 20px 60px;

  max-width: 1280px;
 /* Font Families */
  --font-heading: "Montserrat", sans-serif;
  --font-body-1:  "Poppins", sans-serif;
  --font-body-2:  "Poppins", sans-serif;
  --font-body-3:  "Poppins", sans-serif;
  --itr-font:     "Poppins", sans-serif;

  /* H1 */
  --h1-size:   38px;
  --h1-line:   50px;
  --h1-weight: 700;

  /* H2 */
  --h2-size:   32px;
  --h2-line:   42px;
  --h2-weight: 700;

  /* H3 */
  --h3-size:   26px;
  --h3-line:   36px;
  --h3-weight: 700;

  /* H4 */
  --h4-size:   20px;
  --h4-line:   28px;
  --h4-weight: 700;

  /* Body 1 */
  --body1-size: 18px;
  --body1-line: 26px;

  /* Body 2 */
  --body2-size: 16px;
  --body2-line: 24px;

  /* Body 3 */
  --body3-size: 14px;
  --body3-line: 24px;
}

/* Laptop */
@media (max-width: 1366px) {
  :root {
    --h1-size:    38px;
    --h2-size:    32px;
    --h3-size:    26px;
    --h4-size:    20px;
    --body1-size: 18px;
    --body2-size: 16px;
    --body3-size: 14px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --h1-size:    32px;
    --h1-line:    38px;
    --h2-size:    26px;
    --h2-line:    36px;
    --h3-size:    22px;
    --h3-line:    28px;
    --h4-size:    18px;
    --h4-line:    24px;
    --body1-size: 16px;
    --body2-size: 14px;
    --body3-size: 12px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --h1-size:    26px;
    --h1-line:    32px;
    --h2-size:    22px;
    --h2-line:    32px;
    --h3-size:    18px;
    --h3-line:    24px;
    --h4-size:    18px;
    --h4-line:    24px;
    --body1-size: 16px;
    --body2-size: 14px;
    --body3-size: 12px;
  }
}

.itr-cat-breadcrumb {
  font-size: var(--body1-size);
  color: var(--itr-muted);
  margin-bottom: 18px;
}

.itr-cat-breadcrumb a {
  color: #3E3E3E;
  font-size: var(--body1-size);
  text-decoration: none;
}

.itr-cat-breadcrumb a:hover {
  text-decoration: underline;
}

.itr-cat-breadcrumb-sep {
  margin: 0 6px;
}

.itr-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
 height: auto;
    background: linear-gradient(900deg, #F5FBFD 0%, #F5FBFD 35%, #F3F9FB 100%);
    border: 1px solid #f1f1f1;
  border-radius: 24px;
  padding: 48px 40px;
  margin-bottom: 24px;
}

.itr-cat-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.itr-cat-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Progress Bar */
.itr-cat-progress-wrap {
  width: 100%;
  max-width: 320px;
}

.itr-cat-progress-bar {
  height: 4px;
  background: #e0eef3;
  border-radius: 99px;
  overflow: hidden;
}

.itr-cat-progress-fill {
  height: 100%;
  background: #7CB8D6;
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* .itr-cat-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--itr-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--itr-teal);
  flex-shrink: 0;
} */

.itr-cat-header-icon img{
  width: 100px;
  height: 100px;
  border-radius: 50%;
}
.itr-cat-header-icon svg {
  width: 20px;
  height: 20px;
}

.itr-cat-header h1 {
  font-size: var(--h2-size);
  font-weight: var(--h3-size);
  color: #0F4C6A;
  margin: 0 0 2px;
}

.itr-cat-header p {
  font-size: var(--body1-size);
  color: #3E3E3E;
  margin: 0;
}


.itr-cat-header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
      background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #f3f5f7;
    box-shadow: 0 0 1px #E5EDF4;
}

.itr-cat-stat-card {
  /* display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; */

  display:grid;
    grid-template-columns:28px auto;
    grid-template-areas:
        "icon value"
        "icon label";
    column-gap:12px;
    row-gap:2px;
    align-items:start;
  gap: 2px;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 90px;
  
}

.itr-cat-stat-card .itr-cat-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--itr-muted);
  margin-bottom: 2px;
   grid-area:icon;
    width:28px;
    height:28px;
}

.itr-cat-stat-card .itr-cat-stat-icon img {
  /* width: 16px;
  height: 16px;
  object-fit: contain; */

    width:100%;
    height:100%;
    object-fit:contain;
    margin-right: 10px;
}

.itr-cat-stat-value {
  font-size: var(--body1-size);
  font-weight: 700;
  color: #2C2C2C;
  line-height: 1;

  grid-area:value;
    /* font-size:40px;
    line-height:1;
    font-weight:600; */
}

.itr-cat-stat-label {
  font-size: var(--body3-size);
  color: #3E3E3E;
  white-space: nowrap;
  grid-area:label;
    /* font-size:16px;
    color:#4B5563; */
}

.itr-cat-stat-card--completed .itr-cat-stat-icon { color: var(--itr-success); }
/* .itr-cat-stat-card--completed .itr-cat-stat-value { color: var(--itr-success); } */
.itr-cat-stat-card--completed, .itr-cat-stat-card--progress{
  border-left: 1px solid #E4EAF3;
    border-radius: 0px;
}
.itr-cat-stat-card--progress .itr-cat-stat-icon { color: var(--itr-warning); }
/* .itr-cat-stat-card--progress .itr-cat-stat-value { color: var(--itr-warning); } */

/* .itr-cat-header-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.itr-cat-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--itr-muted);
}

.itr-cat-stat-completed {
  color: var(--itr-success);
}

.itr-cat-stat-progress {
  color: var(--itr-warning);
}

.itr-cat-stat-icon {
  display: inline-flex;
  align-items: center;
} */

.itr-cat-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.itr-cat-sort {
  display: flex;
  align-items: center;
      border: 1px solid #D7EDF7 !important;
    padding: 16px 24px;
    border-radius: 4px;
  gap: 8px;
  font-size: var(--body1-size);
}

.itr-cat-sort select {
  border: none;
  padding: 0px;
  font-size: var(--body1-size);
}

.itr-cat-show-all {
  background: var(--itr-bg);
  border: 1px solid #D7EDF7 !important;
    padding: 16px 24px;
    border-radius: 4px;
  font-size: var(--body1-size);
  font-weight: var(--body1-weight);
  color: #3E3E3E;
  cursor: pointer;
}

.itr-cat-show-all.is-active {
  background: var(--itr-teal-light);
  border-color: var(--itr-teal);
  color: var(--itr-teal);
}

.itr-cat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--itr-border);
  border-radius: 30px;
  padding: 7px 14px;
  margin-left: auto;
  min-width: 200px;
}

.itr-cat-search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 13px;
  font-family: var(--itr-font);
  background: transparent;
}

.itr-cat-search svg {
  color: white;
  flex-shrink: 0;
}

.itr-cat-case-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.itr-cat-case-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--itr-bg);
  border: 1px solid #f3f5f7;
    box-shadow: 0 0px 2px #E5EDF4;
    border-radius: 16px;
    padding: 20px;
  text-decoration: none;
  color: #0F4C6A;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.itr-cat-case-row[data-case-status="in_progress"] {
  border-left: 4px solid #0F4C6A;
  background: #F5FBFD;
}

.itr-cat-case-row[data-case-status="in_progress"] .itr-cat-case-title {
  font-weight: 700;
  color: var(--itr-teal);
}

.itr-cat-case-row:hover {
  border-color: var(--itr-teal);
  box-shadow: 0 2px 12px rgba(27, 107, 123, 0.10);
}

.itr-cat-case-number {
  flex-shrink: 0;
  border: 1px solid #f3f5f7;
    background: white;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: var(--h3-size);
  color: var(--itr-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.itr-cat-case-title {
  flex: 1;
  font-size: var(--h4-size);
  font-weight: 400;
}

.itr-cat-case-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--body1-size);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.itr-status-completed {
  /* background: #e6f5ec; */
  color: var(--itr-success);
  font-weight: 500;
}

.itr-status-in-progress {
  background: #FFE8C1;
    color: #654205;
    padding: 9px 24px;
    font-size: var(--body1-size);
    font-weight: 500;
}

.itr-cat-case-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 30px;
  white-space: nowrap;
  flex-shrink: 0;
}

.itr-case-btn-outline {
  padding: 16px 24px;
    font-size: var(--body1-size);
    border: 1px solid #0c4a68;
    font-weight: 400;
    color: #0c4a68;
}

.itr-case-btn-primary {
      background: #0C4A68;
    color: #fff;
    padding: 16px 24px;
    font-size: var(--body2-size);
    font-weight: 400;
}

.itr-case-btn-secondary {
  background: var(--itr-teal-light);
  color: var(--itr-teal);
  padding: 16px 24px;
    font-size: var(--body1-size);
    font-weight: 400;
}

/* .itr-cat-case-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--itr-border);
  color: var(--itr-teal);
  flex-shrink: 0;
} */
.itr-cat-case-chevron svg{
  width: 32px;
    height: 32px;
    stroke: #0C4A68;
    stroke-width: 1;
}
.itr-cat-case-chevron svg:hover{
    stroke: #7CB8D6;
}



.itr-cat-empty-state,
.itr-cat-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--itr-muted);
}

.itr-cat-empty-state svg {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--itr-border);
}

.itr-cat-empty-state h3 {
  font-size: var(--body1-size);
  color: var(--itr-text);
  margin: 0 0 6px;
}

.itr-cat-empty-state p,
.itr-cat-no-results p {
  font-size: var(--body3-size);
  margin: 0;
}

@media (max-width: 640px) {
  .itr-cat-header {
    flex-direction: row;
    align-items: flex-start;
    padding: 20px;
    height: auto;
  }

  .itr-cat-header h1{
    font-size: var(--h4-size);
  }

  .itr-cat-controls {
    flex-direction: column;
    align-items: stretch;
  }
  /* .itr-cat-header-stats{
    display:grid;
    grid-template-columns:repeat(2,1fr);
  } */

  .itr-cat-stat-card--completed, .itr-cat-stat-card--progress{
  border-left: none;
    border-radius: 0px;
}
  .itr-cat-search {
    margin-left: 0;
  }

  .itr-cat-case-row {
    flex-wrap: wrap;
    padding: 20px;
  }

  .itr-cat-case-title {
    font-size: var(--h4-size);
    flex-basis: 100%;
    order: 1;
  }

  .itr-cat-case-number {
    order: 0;
  }

  .itr-cat-case-badge,
  .itr-cat-case-btn {
    order: 2;
    font-size: 14px;
  }

  .itr-cat-case-list .itr-cat-case-chevron{
    display: none;
  }
}
