/* ================================================================
   CheckCash Pro — Custom Styles
================================================================ */
:root {
  --sidebar-bg:    #1E2B3C;
  --sidebar-hover: #263547;
  --sidebar-active:#2E75B6;
  --accent:        #2E75B6;
  --accent-dark:   #1A5A9A;
  --green:         #27AE60;
  --red:           #E74C3C;
  --orange:        #F39C12;
  --purple:        #8E44AD;
  --content-bg:    #F0F2F5;
  --card-bg:       #FFFFFF;
  --text-primary:  #1A1A2E;
  --text-muted:    #6C7A8A;
  --border:        #DDE3EC;
  --sidebar-width: 230px;
}

/* ── Reset & base ───────────────────────────────────────────── */
* { box-sizing: border-box; }
body { background: var(--content-bg); font-family: 'Segoe UI', system-ui, sans-serif;
       font-size: 14px; color: var(--text-primary); }

/* ── Layout ─────────────────────────────────────────────────── */
#wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform .3s ease;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid #263547;
  margin-bottom: 8px;
}
.logo-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--sidebar-active);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: white;
  flex-shrink: 0;
}
.logo-title { font-size: 16px; font-weight: 700; color: white; line-height: 1; }
.logo-sub   { font-size: 11px; color: #6B8090; margin-top: 2px; }

.sidebar-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: #506070; padding: 8px 20px 4px; text-transform: uppercase;
}

#sidebar .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 2px 10px;
  border-radius: 7px;
  color: #B0BEC5; font-size: 13.5px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
#sidebar .nav-link i { width: 18px; text-align: center; }
#sidebar .nav-link:hover  { background: var(--sidebar-hover); color: #ECEFF1; }
#sidebar .nav-link.active { background: var(--sidebar-active); color: white; font-weight: 600; }

.sidebar-user {
  margin-top: auto;
  padding: 14px;
  background: #263547;
  border-top: 1px solid #344557;
}

/* ── Page Content ────────────────────────────────────────────── */
#page-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.top-bar {
  display: flex; align-items: center;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.page-title { font-size: 17px; font-weight: 600; color: #1A3A5C; }

/* ── Main Content ────────────────────────────────────────────── */
.main-content { padding: 24px; flex: 1; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.card-header {
  background: white; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 15px; color: #1A3A5C;
  border-radius: 12px 12px 0 0 !important;
  padding: 14px 20px;
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-card {
  border-radius: 14px; padding: 20px;
  color: white; position: relative; overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,.12);
}
.stat-card .stat-label { font-size: 11px; font-weight: 700; letter-spacing: .06em;
                          opacity: .8; text-transform: uppercase; }
.stat-card .stat-value { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 6px 0 4px; }
.stat-card .stat-sub   { font-size: 12px; opacity: .7; }
.stat-card .stat-icon  { position: absolute; right: 16px; bottom: 14px;
                          font-size: 42px; opacity: .18; }

.stat-blue   { background: linear-gradient(135deg, #2E75B6, #1A5A9A); }
.stat-green  { background: linear-gradient(135deg, #27AE60, #1E8449); }
.stat-purple { background: linear-gradient(135deg, #8E44AD, #6C3483); }
.stat-orange { background: linear-gradient(135deg, #F39C12, #D68910); }
.stat-teal   { background: linear-gradient(135deg, #17A2B8, #138496); }
.stat-red    { background: linear-gradient(135deg, #E74C3C, #C0392B); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn { border-radius: 7px; font-weight: 500; }
.btn-primary   { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-success   { background: var(--green); border-color: var(--green); }
.btn-danger    { background: var(--red);   border-color: var(--red);   }
.btn-warning   { background: var(--orange); border-color: var(--orange); color: white; }
.btn-purple    { background: var(--purple); border-color: var(--purple); color: white; }
.btn-purple:hover { background: #7D3C98; color: white; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13.5px;
  transition: border-color .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,117,182,.12);
}
.form-label { font-size: 12px; font-weight: 600; color: var(--text-muted);
              text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }

/* ── Tables ──────────────────────────────────────────────────── */
.table thead th {
  background: var(--sidebar-bg); color: white;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; border: none; padding: 11px 14px;
}
.table thead th:first-child { border-radius: 8px 0 0 0; }
.table thead th:last-child  { border-radius: 0 8px 0 0; }
.table tbody td { padding: 11px 14px; vertical-align: middle; }
.table-striped tbody tr:nth-of-type(odd) { background: #F8FAFD; }
.table tbody tr:hover { background: #EAF2FB !important; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge { font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 5px; }
.bg-purple { background-color: var(--purple) !important; }

/* ── Login Page ──────────────────────────────────────────────── */
.login-page { min-height: 100vh; background: var(--sidebar-bg);
              display: flex; align-items: center; justify-content: center; }
.login-card { background: #263547; border-radius: 16px; padding: 40px;
              width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { width: 72px; height: 72px; background: var(--sidebar-active);
              border-radius: 50%; display: flex; align-items: center; justify-content: center;
              font-size: 36px; font-weight: 800; color: white; margin: 0 auto 20px; }
.login-title { font-size: 24px; font-weight: 700; color: white; text-align: center; }
.login-sub   { font-size: 12px; color: #90A0B0; text-align: center; margin-bottom: 28px; }
.login-input { background: #1E2B3C !important; border: 1.5px solid #3D5066 !important;
               color: white !important; padding: 12px 14px !important; }
.login-input::placeholder { color: #506070; }
.login-input:focus { border-color: var(--sidebar-active) !important;
                     box-shadow: 0 0 0 3px rgba(46,117,182,.15) !important; }
.login-label { color: #90A0B0; font-size: 11px; font-weight: 700; text-transform: uppercase;
               letter-spacing: .06em; }

/* ── Customer form photo ─────────────────────────────────────── */
.customer-photo {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border);
}
.customer-photo-placeholder {
  width: 140px; height: 140px; border-radius: 50%;
  background: #EAF2FB; display: flex; align-items: center;
  justify-content: center; font-size: 50px; color: #AABBCC;
  border: 3px solid var(--border);
}

/* ── Check cashing workflow ──────────────────────────────────── */
.workflow-step {
  background: white; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07); height: 100%;
}
.step-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 12px;
}
.fee-summary {
  background: var(--content-bg); border-radius: 10px; padding: 16px;
}
.fee-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.fee-row.total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.net-amount { font-size: 28px; font-weight: 800; color: var(--green); }
.customer-search-results {
  border: 1px solid var(--border); border-radius: 7px;
  max-height: 240px; overflow-y: auto; background: white;
}
.customer-search-results .result-item {
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #F0F2F5;
}
.customer-search-results .result-item:hover { background: #EAF2FB; }
.customer-search-results .result-item:last-child { border-bottom: none; }

.selected-customer-card {
  background: #EAF7F0; border: 1.5px solid var(--green);
  border-radius: 8px; padding: 12px 14px;
}
.block-warning {
  background: #FFF5F5; border: 1px solid #FFCCCC;
  border-radius: 7px; padding: 10px 14px; color: var(--red);
}

/* ── Bank collection checkboxes ──────────────────────────────── */
.collection-check { width: 18px; height: 18px; cursor: pointer; }
.collection-totals {
  background: var(--content-bg); border-radius: 10px;
  padding: 20px; position: sticky; top: 80px;
}
.total-amount-big { font-size: 26px; font-weight: 800; color: var(--green); }

/* ── Reports filter panel ────────────────────────────────────── */
.filter-panel { background: white; border-radius: 12px; padding: 20px;
                box-shadow: 0 2px 10px rgba(0,0,0,.07); margin-bottom: 20px; }

/* ── Expiring ID alerts ──────────────────────────────────────── */
.expiring-item {
  background: #FFFDF0; border: 1px solid #F0C050;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
}
.expiring-date { color: #C0390B; font-weight: 700; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.show { transform: translateX(0); }
  #page-content { margin-left: 0; }
  .stat-card .stat-value { font-size: 24px; }
}

/* ── Print styles ────────────────────────────────────────────── */
@media print {
  #sidebar, .top-bar, .btn, .no-print { display: none !important; }
  #page-content { margin-left: 0 !important; }
  .main-content { padding: 0 !important; }
  .card { box-shadow: none !important; }
  body { background: white !important; }
}

/* ── Misc ────────────────────────────────────────────────────── */
.section-title { font-size: 22px; font-weight: 700; color: #1A3A5C; }
.section-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.text-muted    { color: var(--text-muted) !important; }
.divider       { border-top: 1px solid var(--border); margin: 16px 0; }
.datatables-wrapper .dataTables_filter input { border-radius: 7px; padding: 6px 10px; }
.upload-preview { max-width: 100%; max-height: 200px; border-radius: 8px;
                  border: 2px solid var(--border); display: block; margin-top: 8px; }

/* ── Site Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--sidebar-bg);
  color: #6B7D8E;
  font-size: 12px;
  text-align: center;
  padding: 12px 24px;
  border-top: 1px solid #263547;
  margin-top: auto;
  line-height: 1.6;
}
.site-footer strong { color: #90A8C0; }
.site-footer a { color: #8AABCC; text-decoration: none; }
.site-footer a:hover { color: #D4A866; text-decoration: underline; }
