/* Status Filter Bar Styles (shared for CAR-Claim, CAR-C, etc.) */
.status-filter .status-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1.5px dashed #d1d5db;
  border-radius: 12px;
  color: #7b7b8b;
  font-weight: 500;
  font-size: 1em;
  padding: 4px 14px 4px 10px;
  transition: all 0.15s;
  outline: none;
}
.status-filter .status-btn.active {
  border: 1.5px solid #3a6ff8;
  background: #f5f8ff;
  color: #2250c5;
  box-shadow: 0 0 0 2px #e3eaff;
}
.status-filter .status-btn:disabled,
.status-filter .status-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}
.status-filter .status-badge {
  display: inline-block;
  min-width: 32px;
  padding: 0 6px;
  margin-left: 6px;
  background: #f3f4f6;
  color: #7b7b8b;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 600;
  text-align: center;
}
.status-filter .status-btn.active .status-badge {
  background: #3a6ff8;
  color: #fff;
}
html {
  font-size: 14px;
}

/* Clean, compact sidebar styles */
.sidebar {
  background: #fff;
  color: #0d1a4d;
  min-height: 100vh;
  width: 240px;
  box-shadow: 2px 0 16px rgba(44, 62, 80, 0.06);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', 'Prompt', 'Kanit', Arial, sans-serif;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  min-height: 40px;
}
.sidebar-logo {
  font-size: 1.25rem;
  font-weight: 900;
  color: #1976d2;
}
.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d1a4d;
}

.sidebar-menu{
  /* keep top-level nav container styles */
  margin:0;
  padding:10px 0 24px 0;
  flex:1 1 auto;
}
.sidebar-menu > ul { list-style: none; padding-left: 0; margin: 0; }
.sidebar-menu li{padding:0;margin:0}
.sidebar-menu li a{
  display:flex;align-items:center;padding:16px 14px;margin:4px 10px;border-radius:8px;color:#1976d2;text-decoration:none;font-weight:600;transition:all .16s;font-size:1rem
}
.sidebar-menu li a .sidebar-icon{margin-right:12px;color:#98a0c8}
.sidebar-menu li a:hover{background:#f2f6ff;color:#1976d2}
.sidebar-menu li a.active{background:#e6eaff;color:#1976d2;font-weight:700}

/* Submenu (e.g. Report -> Case Monitor) should align text with parent label */
.sidebar-submenu {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.sidebar-submenu li { margin: 0; padding: 0; }
.sidebar-submenu li a {
  display: block;
  padding: 8px 14px 8px 32px; /* left padding aligns with parent text (icon width + spacing) */
  margin: 4px 10px;
  border-radius: 8px;
  color: #1976d2;
  text-decoration: none;
  font-weight: 600;
}
.sidebar-submenu li a:hover { background: #f2f6ff; color: #1976d2; }

/* layout: push main content to the right of sidebar */
.main-layout{display:flex}
.main-layout > *:not(.sidebar){margin-left:240px;width:calc(100% - 240px)}

/* end of cleaned top styles */

/* Header styles */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 8px 24px; /* ????????? header */
  border-bottom: 2px solid #e5e5e5;
  min-height: 48px;
}
.dashboard-title {
  font-size: 1.3rem; /* ??????????????????? header ?????????? */
  font-weight: bold;
  color: #222;
}
.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.search-box {
  width: 320px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  font-size: 1rem;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.notification-icon {
  position: relative;
  font-size: 1.5rem;
  cursor: pointer;
}
.badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #e53e3e;
  color: #fff;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 0.8rem;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-avatar {
  background: #2e3b8f;
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}
.user-name {
  font-weight: bold;
  color: #222;
}
.user-role {
  font-size: 0.9rem;
  color: #888;
}

/* Main content */
.main-content {
  padding: 0px;
}

/* CAR-C custom styles */
.carc-container {
  background: #fff;
/*  border-radius: 8px;*/
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.carc-header {
  background: #232fb1;
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 6px 6px 0 0;
  margin-bottom: 18px;
}
.carc-search-form {
  margin-bottom: 18px;
}
.carc-row {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
}
.carc-col {
  flex: 1;
  min-width: 180px;
}
.carc-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.carc-table-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 18px;
  overflow-x: auto;
}
.carc-table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.carc-table-search {
  margin-left: 0;
  width: 220px;
}
.carc-table th.text-danger, .carc-table td.text-danger {
  color: #e53e3e !important;
  font-weight: bold;
}
.carc-table th, .carc-table td {
  vertical-align: middle;
  text-align: center;
}
.carc-table {
  min-width: 900px;
}

/* --- Search Theme --- */
.carc-search-theme {
  background: linear-gradient(90deg, #2a3fd8 60%, #2a3fd8 100%);
/*  border-radius: 16px;*/
  padding: 10px 4px 32px 18px;
  /* margin-bottom: 24px; */
  color: #fff;
  position: relative;
}
.carc-search-header {
  display: flex;
  align-items: center;
  font-size: 1.7rem;
  font-weight: bold;
  margin-bottom: 18px;
  gap: 16px;
}
.carc-search-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}
.carc-search-divider {
  font-size: 1.5rem;
  color: #fff;
  margin: 0 8px;
}
.carc-search-desc {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 400;
}
.carc-search-form-simple {
  background: #fff;
  border-radius: 24px;
  padding: 4px 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 0;
}
.carc-search-fields {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
}
.carc-search-field {
  display: flex;
  align-items: center;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 0 16px;
  min-width: 220px;
  height: 56px;
}
.carc-search-field:last-child {
  border-right: none;
}
.carc-search-icon {
  color: #b3b3c6;
  font-size: 1.2rem;
  margin-right: 8px;
}
.carc-search-field input,
.carc-search-field select {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: #222;
  width: 100%;
  outline: none;
  box-shadow: none;
}
.carc-search-btn {
  background: #233fd8;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0 32px;
  height: 44px;
  margin-left: 18px;
  margin-right: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s;
}
.carc-search-btn:hover {
  background: #1a2fa0;
}
.carc-adv-btn {
  background: none;
  color: #233fd8;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  margin-left: 8px;
  cursor: pointer;
  height: 44px;
}
.carc-search-form-adv {
  background: #fff;
  border-radius: 16px;
  padding: 12px 32px;
  margin-top: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.carc-search-form-adv .carc-row {
  gap: 24px;
  margin-bottom: 18px;
}
.carc-search-form-adv .carc-actions {
  justify-content: flex-start;
}

/* --- Label styles for Advanced Search --- */
.carc-label {
  display: block;
  color: black;
  font-weight: 600;
  font-size: 1.08rem;
  margin-bottom: 6px;
  margin-left: 2px;
}
.carc-search-form-adv .carc-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.carc-search-form-adv .form-control {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  font-size: 1.08rem;
  color: #222;
  margin-bottom: 0;
}

/* ComplaintForm page styles */
.complaint-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0;
    margin-top: 16px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}
.complaint-header {
    background: #232fb1;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 10px 24px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}
.complaint-formno-link {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}
.complaint-pdf-btn {
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 18px;
    font-weight: bold;
    margin: 0 8px;
    cursor: pointer;
}
.complaint-crmref {
    margin-left: 8px;
}
.complaint-status {
    position: absolute;
    right: 24px;
    top: 12px;
    background: #3ecf4c;
    color: #fff;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    padding: 4px 16px;
}
.complaint-form-section {
    padding: 24px 18px 0 18px;
}
.complaint-form-row {
    display: flex;
    gap: 32px;
}
.complaint-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.complaint-form-col label {
    font-weight: 400;
    margin-bottom: 0px;
    color:  black;
}
.complaint-form-col .form-control {
    background: #eaeaea;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    color: #222;
    padding: 6px 12px;
}
.complaint-form-col textarea.form-control {
    min-height: 48px;
}
.complaint-radio-group {
    display: flex;
    gap: 18px;
    margin-bottom: 8px;
}
.complaint-attach {
    display: flex;
    align-items: center;
    gap: 8px;
}
.complaint-download-btn {
    background: #009688;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 1.1rem;
    cursor: pointer;
}
.complaint-createdby {
    margin-top: 18px;
    color: #232fb1;
    font-size: 0.95rem;
}
.complaint-table-section {
    padding: 18px;
    overflow-x: auto;
}
.complaint-table th, .complaint-table td {
    vertical-align: middle;
    text-align: center;
    font-size: 0.98rem;
}
.complaint-table th {
    background: #f0f0f0;
    font-weight: bold;
}
.complaint-table {
    min-width: 900px;
}

/* CAR-C section styles for ComplaintForm */
.carc-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 24px;
    padding: 0 0 24px 0;
}
.carc-section-header {
    background: #232fb1;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 10px 24px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}
.carc-formno {
    color: #fff;
    font-weight: bold;
}
.carc-pdf-btn {
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 18px;
    font-weight: bold;
    margin: 0 8px;
    cursor: pointer;
}
.carc-crmref {
    margin-left: 8px;
}
.carc-subsection {
    background: #f6f6f6;
    border-radius: 0 0 8px 8px;
    padding: 18px 24px;
}
.carc-subsection-header {
    background: #888;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
}
.carc-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.carc-form-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
}
.carc-form-label {
    min-width: 120px;
    font-weight: 400;
    color: black;
}
.carc-form-input {
    min-width: 200px;
    max-width: 300px;
    background: #eaeaea;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #222;
    padding: 4px 8px;
}
.carc-checkbox-group {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.carc-img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 8px;
}

/* CAR-C answer section styles */
.carc-answer-table-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 8px 0;
    margin-bottom: 12px;
}
.carc-answer-table th, .carc-answer-table td {
    vertical-align: middle;
    text-align: left;
    font-size: 0.98rem;
    background: #f6f6f6;
    border: 1px solid #e0e0e0;
}
.carc-answer-table th {
    font-weight: bold;
    background: #e0e0e0;
}
.carc-answer-table textarea.form-control {
    min-height: 38px;
    background: #eaeaea;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    color: #222;
    padding: 6px 12px;
}
.carc-answer-table input.form-control {
    background: #eaeaea;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    color: #222;
    padding: 6px 12px;
}

/* CaseMonitor page styles */
.case-monitor-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0;
    margin-top: 0px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}
.cm-section {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 0 0 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.cm-section-header {
    background: #232fb1;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 10px 24px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 18px;
}
.cm-criteria-form {
    padding: 18px 24px 0 24px;
}
.cm-row {
    display: flex;
    gap: 32px;
    margin-bottom: 12px;
}
.cm-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}
.cm-col label {
    font-weight: 600;
    color: #232fb1;
    margin-bottom: 2px;
}
.cm-col .form-control {
    background: #eaeaea;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    color: #222;
    padding: 6px 12px;
}
.cm-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: flex-end;
}
.cm-search-btn {
    background: #233fd8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0 32px;
    height: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s;
}
.cm-search-btn:hover {
    background: #1a2fa0;
}
.cm-search-icon {
    margin-right: 8px;
}
.cm-graph-row {
    display: flex;
    gap: 32px;
    padding: 24px;
}
.cm-graph-col {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 18px;
}

/* Approval Card Styles */
.approval-card {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 18px;
    padding: 0;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.approval-header {
    background: #555;
    color: #fff;
    font-size: 1.08rem;
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.approval-header::after {
    content: '\2714';
    color: #bfc9b7;
    font-size: 1.3em;
    position: absolute;
    right: 18px;
    top: 10px;
}
.approval-warning {
    background: none;
    color: #444;
    font-size: 1rem;
    padding: 16px 18px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.approval-warning input[type="checkbox"] {
    accent-color: #4caf50;
    margin-right: 6px;
    transform: scale(1.2);
}
.approval-warning span {
    font-size: 0.98rem;
    color: #222;
    margin-bottom: 2px;
}
.approval-warning textarea.form-control {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #444;
    font-size: 0.98rem;
    margin-top: 4px;
    min-height: 48px;
    resize: none;
}
.form-group.mt-2 {
    padding: 0 18px;
    margin-top: 12px !important;
}
.form-group.mt-2 label {
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
}
.form-group.mt-2 textarea.form-control {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #444;
    font-size: 0.98rem;
    min-height: 38px;
    resize: none;
}
.form-group.mt-2 .text-danger {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 2px;
}
.approval-info {
    padding: 0 18px;
    color: #444;
    font-size: 0.98rem;
    margin-top: 8px;
}
.approval-info div {
    margin-bottom: 2px;
}
.approval-actions {
    display: flex;
    gap: 10px;
    padding: 0 18px 18px 18px;
    margin-top: auto;
}
.approval-actions .btn-success {
    background: #4caf50;
    border: none;
    color: #fff;
    font-weight: bold;
    padding: 4px 18px;
    border-radius: 4px;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 4px;
}
.approval-actions .btn-danger {
    background: #ff7043;
    border: none;
    color: #fff;
    font-weight: bold;
    padding: 4px 18px;
    border-radius: 4px;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 4px;
}
.approval-actions .btn-success:before {
    content: '\2714';
    margin-right: 4px;
}
.approval-actions .btn-danger:before {
    content: '\2716';
    margin-right: 4px;
}

/* Save Button Styles */
.btn-save {
    background: #5ba4b0;
    color: #fff;
    border: none;
    font-weight: bold;
    padding: 4px 18px;
    border-radius: 4px;
    font-size: 1.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-save:before {
    content: '\1F4BE'; /* floppy disk icon */
    margin-right: 4px;
}
.btn-save:hover {
    background: #46818a;
}