*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f1f5f9; color: #1e293b; min-height: 100vh; }

  /* TOPBAR */
  .topbar { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 0.9rem 1.5rem; border-bottom: 1px solid #e2e8f0; }
  .brand { display: flex; align-items: center; gap: 10px; }
  .brand-icon { width: 30px; height: 30px; background: #16a34a; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
  .brand-title { font-size: 18px; font-weight: 600; color: #1e293b; }
  .topbar-actions { display: flex; gap: 8px; }
  .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid #e2e8f0; background: #fff; color: #1e293b; cursor: pointer; transition: background 0.15s; }
  .btn:hover { background: #f8fafc; }
  .btn-primary { background: #16a34a; border-color: #16a34a; color: #fff; }
  .btn-primary:hover { background: #15803d; }
  .btn-ghost { background: #f8fafc; }
  .notif-btn { position: relative; }
  .notif-badge { position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 20px; }

  /* LAYOUT */
  .page { padding: 1.25rem 1.5rem; }
  .stats { display: flex; gap: 10px; margin-bottom: 1.25rem; flex-wrap: wrap; }
  .stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.85rem 1.2rem; display: flex; align-items: center; gap: 10px; min-width: 110px; }
  .stat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .stat-val { font-size: 22px; font-weight: 600; }
  .stat-label { font-size: 12px; color: #64748b; margin-top: 1px; }
  .stat-rate { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }
  .stat-rate .stat-val { color: #15803d; }
  .stat-rate .stat-label { color: #16a34a; }

  .main-grid { display: grid; grid-template-columns: 1fr 330px; gap: 1rem; }

  /* PANEL */
  .panel { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
  .panel-accent { height: 4px; }
  .pa-purple { background: #534AB7; }
  .pa-teal   { background: #1D9E75; }
  .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.1rem; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; gap: 8px; }
  .panel-title { font-size: 14px; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 7px; }
  .panel-controls { display: flex; gap: 7px; align-items: center; }
  .search-box { display: flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; font-size: 12px; color: #94a3b8; }
  .search-box input { border: none; background: transparent; outline: none; font-size: 12px; color: #1e293b; width: 130px; }
  .search-box input::placeholder { color: #94a3b8; }
  select.filter { font-size: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; cursor: pointer; }

  /* TABLE */
  table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  th { padding: 9px 12px; text-align: left; font-size: 11px; font-weight: 600; color: #64748b; border-bottom: 1px solid #e2e8f0; background: #f8fafc; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
  td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: #f8fafc; }
  .dept-name { font-weight: 400; font-size: 12.5px; }
  .dept-freq { font-size: 10px; color: #94a3b8; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
  .tech-name { font-size: 11.5px; color: #475569; line-height: 1.4; }
  .date-cell { font-size: 11px; color: #64748b; white-space: nowrap; }
  .remarks-cell { font-size: 11px; color: #94a3b8; }

  /* BADGES */
  .badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
  .badge-overdue { background: #fef2f2; color: #b91c1c; }
  .badge-completed { background: #f0fdf4; color: #15803d; }
  .badge-pending { background: #fffbeb; color: #b45309; }

  /* ACTION BUTTONS */
  .action-btns { display: flex; gap: 5px; }
  .act-btn { width: 50px; height: 29px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: #475569; transition: all 0.15s; }
  .act-btn:hover { background: #e2e8f0; }
  .act-btn.edit { background: #3b82f6; border-color: #3b82f6; color: #fff; }
  .act-btn.edit:hover { background: #2563eb; }
  .act-btn.note { background: #16a34a; border-color: #16a34a; color: #fff; }
  .act-btn.note:hover { background: #15803d; }

  .table-footer { font-size: 11px; color: #64748b; padding: 0.75rem 1.1rem; border-top: 1px solid #f1f5f9; }
  .table-footer strong { color: #1e293b; }

  /* CALENDAR */

  .ev-overdue { background: #fef2f2; color: #b91c1c; }
  .ev-pending { background: #fffbeb; color: #b45309; }
  .ev-done { background: #f0fdf4; color: #15803d; }
  .cal-more { font-size: 9px; color: #3b82f6; font-weight: 600; margin-top: 1px; cursor: pointer; }
  .cal-legend { display: flex; gap: 12px; padding: 0.65rem 1.1rem; border-top: 1px solid #f1f5f9; justify-content: flex-end; }
  .leg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #64748b; }
  .leg-dot { width: 8px; height: 8px; border-radius: 50%; }

  @media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .stats { gap: 8px; }
    .stat-card { min-width: 80px; }
  }
  
/*bagong add */

/* ── CARD ── */
.card-3d {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.03) inset,
        0 1px 0   rgba(255,255,255,.06) inset,
        var(--shadow-md);
    transition: box-shadow .25s ease;
    overflow: hidden;
}
.card-3d:hover {
    border-color: rgba(48,200,90,.2);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.04) inset,
        0 1px 0 rgba(255,255,255,.07) inset,
        0 0 30px rgba(46,160,67,.12),
        var(--shadow-lg);
}

.card-3d .card-header-custom {
    padding: 18px 22px 16px;
    border-bottom: 1px solid var(--border);

    display: flex; align-items: center; justify-content: space-between;
}

.card-3d .card-header-custom h5 {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
    display: flex; align-items: center; gap: 8px;
}

.card-body-custom {
    padding: 20px 22px;
}

/* ── CALENDAR OVERRIDES ── */
#calendar {
    /*--background: transparent;
    color: var(--txt);
    fc-border-color: var(--border);
    --fc-button-bg-color: var(--surface-3);
    --fc-button-border-color: var(--border);
    --fc-button-hover-bg-color: var(--surface-2);
    --fc-button-active-bg-color: var(--green);
    --fc-button-active-border-color: var(--green);
    --fc-today-bg-color: rgba(242, 253, 244, 0.1);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--surface-3);
    --fc-list-event-hover-bg-color: var(--surface-3);*/
    --fc-small-font-size: .7em;
}

.fc .fc-toolbar-title {
    font-size: .9rem !important;
    font-weight: 700;
    letter-spacing: -.01em;
}

.fc .fc-button {
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    font-size: .8rem !important;
    text-transform: none !important;
    padding: 3px 4px !important;
    box-shadow: var(--shadow-sm) !important;
}

.fc .fc-col-header-cell {
    background: var(--surface-3);
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--txt-muted);
}

.fc .fc-daygrid-day-number {
    font-size: 13.5px; font-weight: 600; color: #1e1b4b; display: flex; align-items: center; gap: 7px;
}

.fc .fc-day-today .fc-daygrid-day-number {
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    margin: 4px;
    font-size: .65rem;
}

.fc-event {
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 2px 4px !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(245, 243, 243, 0.4) !important;
}


/* ── STATUS BADGES ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 9px;
    font-size: .57rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.status-badge::before {
    content: '';
    display: block;
    width: 5px; height: 5px;
    border-radius: 50%;
}

.badge-pending   { color: #d29922;}
.badge-completed { color: #3fb950; }
.badge-overdue   { color: #f85149; }


/* ── SEARCH BOX ── */
.search-wrap {
    position: relative;
    margin-bottom: 16px;
}
.search-wrap input {
    width: 100%;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 14px 9px 36px;
    color: var(--txt);
    font-family: var(--font-body);
    font-size: .84rem;
    outline: none;
    transition: border-color .2s;
}
.search-wrap input:focus { border-color: var(--green); }
.search-wrap .bi {
    position: absolute; left: 11px; top: 50%;
    transform: translateY(-50%);
    color: var(--txt-dim); font-size: .9rem;
}

/* ── MODAL (WHITE THEME) ── */
.modal-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    overflow: hidden;
    color: #1e293b;
}

/* Header */
/* ── MODAL (SLATE THEME #334155 BASED) ── */
.modal-content {
    background: #f8fafc; /* soft light base */
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.10),
        0 2px 8px rgba(0, 0, 0, 0.05);
    color: #1e293b;
    overflow: hidden;
}

/* HEADER */
.modal-header-custom {
    padding: 18px 22px;
    background: #334155;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-header-custom h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ICON */
.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* BODY */
.modal-body-custom {
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    color: #334155;
}

/* FOOTER */
.modal-footer-custom {
    padding: 16px 26px 20px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── TAB BAR (VERY LIGHT DARK / SOFT SLATE) ── */
.tab-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 6px;
    background: #f1f5f9; /* very light slate */
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* TAB BUTTON */
.tab-button {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    transition: 0.2s;
}

/* HOVER */
.tab-button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ACTIVE TAB */
.tab-button.active {
    background: #ffffff;
    color: #111827;
    border: 1px solid #22c55e;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.12);
}

/* TAB PANELS */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* smooth transition */
.tab-panel.active {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-label-custom {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--txt-muted);
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 5px;
}

.form-control-custom, .form-select-custom {
    width: 100%;
    background: #f1f5f9; /* very light slate */
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 10px 14px;
    color: var(--txt);
    font-family: var(--font-body);
    font-size: .875rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-control-custom:focus, .form-select-custom:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(46,160,67,.2);
}
.form-select-custom { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-select-custom option { background: #f2f3f7; }

textarea.form-control-custom { resize: vertical; min-height: 90px; }

.btn-close-custom {
    background: rgba(255,255,255,.07);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--txt-muted);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all .15s;
}
.btn-close-custom:hover { background: rgba(218,54,51,.2); color: #f85149; border-color: rgba(218,54,51,.4); }

/* ── CSRF SECURITY INDICATOR ── */
.security-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(46,160,67,.08);
    border: 1px solid rgba(46,160,67,.25);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .7rem;
    color: var(--green-hi);
    font-family: var(--font-mono);
}
.security-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-hi); animation: blink 1.8s infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.3; } }

/* ── DIVIDER ── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 4px 0 16px;
}

/* ── SCROLL ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }

/* ── ENTRY ANIMATION ── */
@keyframes fadeUp {
    from { opacity:0; transform: translateY(16px); }
    to   { opacity:1; transform: translateY(0); }
}
.card-3d        { animation: fadeUp .45s ease both; }
.card-3d:nth-child(2) { animation-delay: .08s; }
.page-header    { animation: fadeUp .35s ease both; }

/* ── PM TABLE ── */
.pm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .855rem;
}
.pm-table thead tr {
    border-bottom: 1px solid var(--border);
}
.pm-table th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    white-space: nowrap;
}
.pm-table td {
    border-bottom: 1px solid rgba(48,54,61,.5);
    vertical-align: middle;
}
.pm-table tbody tr:last-child td { border-bottom: none; }
.pm-table tbody tr:hover {
    background: rgba(255,255,255,.02);
}
.pm-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #6f7888;
}
.pm-row.hidden { display: none; }

/* Table action buttons */
.tbl-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    font-size: .75rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
}
.tbl-btn-green {
    background: var(--green-pale);
    border-color: rgba(46,160,67,.3);
    color: var(--green-hi);
}
.tbl-btn-green:hover {
    background: var(--green);
    color: #fff;
    box-shadow: 0 0 12px var(--green-glow);
}

/* ── STATUS UPDATE MODAL ── */
.status-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--surface-3);
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.status-option:hover { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.04); }
.status-option.selected-pending   { border-color: var(--amber); background: rgba(210,153,34,.08); }
.status-option.selected-completed { border-color: var(--green); background: rgba(46,160,67,.08); }
.status-option.selected-overdue   { border-color: var(--red);   background: rgba(218,54,51,.08); }

.status-option-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.so-pending   { background: rgba(210,153,34,.15); color: var(--amber); }
.so-completed { background: rgba(46,160,67,.15);  color: var(--green-hi); }
.so-overdue   { background: rgba(218,54,51,.15);  color: #f85149; }

.status-option-label { font-weight: 700; font-size: .9rem; }
.status-option-desc  { font-size: .78rem; color: var(--txt-muted); margin-top: 2px; }

/* ── PRINT ── */
@media print {
    .page-header .d-flex > .btn-ghost,
    .page-header .d-flex > .btn-export,
    .page-header .d-flex > .btn-primary-green { display: none !important; }
    body { background: #fff; color: #f8f5f5; }
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
    .content { margin-left: 0; padding: 16px; }
}

/* ── TECHNICIAN CHECKBOXES ── */
.tech-checkbox-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    max-height: 160px;
    overflow-y: auto;
}
.tech-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background .15s;
    user-select: none;
}
.tech-checkbox-item:hover {
    background: rgba(255,255,255,.05);
}
.tech-checkbox-item input[type="checkbox"] {
    display: none;
}
.tech-check-box {
    width: 18px; height: 18px;
    border-radius: 5px;

    border: 1.5px solid var(--border);
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    color: transparent;
    flex-shrink: 0;
    transition: all .15s;
}
.tech-checkbox-item input:checked ~ .tech-check-box {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    box-shadow: 0 0 8px var(--green-glow);
}
.tech-name {
    font-size: .855rem;
    color: var(--txt);
}
.tech-checkbox-item input:checked ~ .tech-check-box ~ .tech-name {
    color: var(--green-hi);
    font-weight: 50;
}
/* Modal */

/* Body */
.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Table section */
.table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}

.btn-blue {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-blue:hover {
    transform: translateY(-2px);
}

.btn-gray {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-gray:hover {
    transform: translateY(-2px);
}

.btn-orange {
    background: #CC5500;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-orange:hover {
    transform: translateY(-2px);
}


.btn-green {
    background: #2e9152;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-green:hover {
    transform: translateY(-2px);
}

.fc-daygrid-event .fc-event-title {
    font-size: 10px !important;
    font-weight: 300;
}

/*print modal */
.print-wrapper{
    display:flex;
    flex-direction:column;
    height:100%;
}

.print-options{
    display:flex;
    gap:15px;
    padding:10px;
    border-bottom:1px solid #ddd;
    background:#f8f9fa;
}

.print-card{
    cursor:pointer;
    margin:0;
    color:black;
}

.print-preview{
    flex:1;
    width:100%;
}

#printFrame{
    width:100%;
    height:600px; /* o 100% kung may fixed height ang parent */
    border:none;
}

/*end of print modal */

<!-- ═══════════════════════════════════════════════════════════════════════════
     FLASH MODALS — Success & Error
     Auto-triggered via JS when session flash data is present.
     ═══════════════════════════════════════════════════════════════════════════ -->

/* ── FLASH MODAL STYLES ── */
.flash-modal .modal-content {
    border-radius: 22px !important;
    border: none !important;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.7) !important;

}

.flash-icon-wrap {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem;
    margin: 0 auto 18px;
}

.flash-success-wrap {
    background: rgba(46,160,67,.15);
    box-shadow: 0 0 0 12px rgba(46,160,67,.08), 0 0 0 24px rgba(46,160,67,.04);
    color: #3fb950;
    animation: popIn .45s cubic-bezier(.34,1.56,.64,1) both;
}
.flash-error-wrap {
    background: rgba(218,54,51,.15);
    box-shadow: 0 0 0 12px rgba(218,54,51,.08), 0 0 0 24px rgba(218,54,51,.04);
    color: #f85149;
    animation: popIn .45s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes popIn {
    from { transform: scale(.5); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.flash-body {
    padding: 38px 32px 32px;
    text-align: center;
    background:white;
}
.flash-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}
.flash-subtitle {
    font-size: .875rem;
    color: var(--txt-muted);
    line-height: 1.55;
}
.flash-meta-row {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.flash-meta-pill {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-size: .75rem;
    font-family: var(--font-mono);
    color: var(--txt-muted);
    display: flex; align-items: center; gap: 5px;
}
.flash-footer {
    padding: 0 32px 28px;
    display: flex; justify-content: center; gap: 10px;
    background:white;
}
.flash-error-list {
    text-align: left;
    margin: 14px 0 0;
    padding-left: 18px;
    font-size: .83rem;
    color: #f85149;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════════
   WORK REQUESTS DASHBOARD — stat cards, search, pagination, avatars
   ═══════════════════════════════════════════════════════════════════ */

/* ── STAT CARDS ROW ── */
.stat-cards-row {
    display: flex;
    gap: 14px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.stat-card-box {
    flex: 1;
    min-width: 210px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: box-shadow .2s, transform .2s;
}
.stat-card-box:hover { box-shadow: 0 6px 16px rgba(0,0,0,.06); transform: translateY(-1px); }
.stat-card-box .stat-card-label { font-size: 13px; color: #64748b; margin-bottom: 6px; }
.stat-card-box .stat-card-num { font-size: 28px; font-weight: 700; color: #1e293b; line-height: 1; }
.stat-icon-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.stat-icon-blue  { background: #e0f2fe; color: #0284c7; }
.stat-icon-green { background: #dcfce7; color: #16a34a; }
.stat-icon-amber { background: #fef3c7; color: #d97706; }
.stat-icon-gray  { background: #e2e8f0; color: #475569; }

/* ── TABLE TOOLBAR (search + per-page) ── */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.table-toolbar .search-wrap { margin-bottom: 0; min-width: 220px; flex: 1; max-width: 320px; }

/* ── PAGINATION ── */
.pg-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 8px;
}
.pg-btns { display: flex; gap: 4px; align-items: center; }
.pg-btn {
    min-width: 30px; height: 30px; padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.pg-btn:hover:not(:disabled) { background: #f8fafc; }
.pg-btn.active { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; font-weight: 600; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── AVATAR INITIALS ── */
.avatar-initials {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ── IN-PROGRESS BADGE ── */
.badge-inprogress { background: #eff6ff; color: #1d4ed8; }

/* ── ROW ACTION BUTTONS ── */
.row-action-btns { display: flex; gap: 6px; }
.row-act-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: all .15s;
}
.row-act-btn:hover { background: #e2e8f0; }
.row-act-btn.edit { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.row-act-btn.edit:hover { background: #2563eb; }
.row-act-btn.notes { background: #16a34a; border-color: #16a34a; color: #fff; }
.row-act-btn.notes:hover { background: #15803d; }
.row-act-btn.delete { background: #dc3545; border-color: #dc3545; color: #fff; }
.row-act-btn.delete:hover { background: #b91c1c; }

@media (max-width: 640px) {
    .stat-cards-row { gap: 8px; }
    .stat-card-box { min-width: 140px; padding: 12px 14px; }
    .stat-card-box .stat-card-num { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL MOBILE RESPONSIVENESS
   Applies to every page built on .page / .topbar / .stats / .panel
   (IT Work Request, Manage Work Request dashboard, etc.)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Less wasted padding around page content */
  .page { padding: 0.85rem 0.75rem; }
  .card-body-custom { padding: 14px 14px; }

  /* Topbar (page-level header row) stacks instead of overflowing */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem 1rem;
  }
  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar-actions > * { flex: 1 1 auto; min-width: 0; }
  .brand-title { font-size: 15px; }
  .brand-sub { display: none; }

  /* Stat cards: 2-per-row grid instead of a single overflowing line */
  .stats { gap: 8px; }
  .stat-card {
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
    padding: 0.65rem 0.8rem;
  }
  .stat-val { font-size: 18px; }
  .stat-label { font-size: 11px; }
  .stat-cards-row { gap: 8px; }
  .stat-card-box { flex: 1 1 calc(50% - 8px); min-width: 0; padding: 12px 14px; }
  .stat-card-box .stat-card-num { font-size: 20px; }

  /* Panels / toolbars */
  .panel-header { padding: 0.7rem 0.85rem; flex-wrap: wrap; gap: 8px; }
  .panel-controls { width: 100%; flex-wrap: wrap; gap: 6px; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .table-toolbar { padding: 0.7rem 0.85rem; }
  .table-toolbar .search-wrap { max-width: none; width: 100%; }

  /* Tables: tighter cells so more of the row is visible before scrolling */
  table { font-size: 11.5px; }
  th, td { padding: 8px 8px; }

  /* Pagination row wraps cleanly */
  .pg-wrap { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .stat-card { flex: 1 1 100%; }
  .stat-card-box { flex: 1 1 100%; }
  .stat-val { font-size: 17px; }
  .page { padding: 0.7rem 0.6rem; }
}