/* ============================================================
   InfoTroop Managed IT Services — Customer Portal Stylesheet
   Extracted from design reference and adapted for Laravel Blade
============================================================ */
@font-face {
    font-family: "Aptos";
    src: local("Aptos"), local("Aptos Regular");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "Aptos";
    src: local("Aptos Medium");
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: "Aptos";
    src: local("Aptos SemiBold");
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: "Aptos";
    src: local("Aptos Bold");
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: "Aptos";
    src: local("Aptos ExtraBold");
    font-weight: 800;
    font-style: normal;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366f1;
    --sidebar-bg: #0b1120;
    --sidebar-w: 242px;
    --navbar-h: 56px;
    --dark: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --sidebar-text: rgba(255, 255, 255, 0.65);
    --sidebar-active: #2563eb;
    --sidebar-hover: rgba(255, 255, 255, 0.07);
    --sidebar-line: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16.5px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
    height: var(--navbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    transition: left 0.3s ease;
}

.navbar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
    padding: 6px;
    border-radius: 7px;
    transition: background 0.2s;
}

.navbar-toggle:hover {
    background: var(--bg);
}

.navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 16.5px;
    transition: all 0.2s;
    position: relative;
}

.nav-icon-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 4px;
}

/* Profile button */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    border: none;
    background: none;
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
}

.profile-btn:hover {
    background: var(--bg);
}

.p-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14.5px;
}

.p-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Profile dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    min-width: 220px;
    z-index: 1000;
    padding: 6px;
    display: none;
}

.profile-dropdown.open {
    display: block;
}

.pd-header {
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.pd-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.pd-email {
    font-size: 15.5px;
    color: var(--muted);
    margin-top: 1px;
}

.pd-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15.5px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: none;
    width: 100%;
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
    text-align: left;
}

.pd-item:hover {
    background: var(--bg);
}

.pd-item i {
    width: 18px;
    color: var(--muted);
    font-size: 15.5px;
}

.pd-item.danger {
    color: var(--danger);
}

.pd-item.danger i {
    color: var(--danger);
}

.pd-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(37, 99, 235, 0.25);
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-brand {
    height: var(--navbar-h);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--sidebar-line);
    flex-shrink: 0;
}

.sidebar-brand-name {
    font-size: 16.5px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* ===== SIDEBAR DROPDOWN ===== */
.s-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.18s;
    font-size: 16.5px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    margin-bottom: 0;
    user-select: none;
}

.s-dropdown-toggle:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.s-dropdown-toggle:hover .s-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.s-dropdown-arrow {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.25s ease;
}

.s-dropdown-toggle.open .s-dropdown-arrow {
    transform: rotate(180deg);
}

.s-dropdown-toggle.open {
    background: var(--sidebar-hover);
    color: #fff;
}

.s-dropdown-toggle.open .s-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.s-submenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s ease;
}

.s-submenu.open {
    max-height: 200px;
}

.s-subitem {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 10px 5px 30px;
    border-radius: 8px;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.18s;
    font-size: 15.5px;
    font-weight: 500;
    margin-bottom: 1px;
}

.s-subitem:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.s-subitem.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.s-subitem-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    transition: background 0.18s;
}

.s-subitem:hover .s-subitem-dot,
.s-subitem.active .s-subitem-dot {
    background: #fff;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px 12px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.s-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.18s;
    font-size: 16.5px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    margin-bottom: 0;
}

.s-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.s-item:hover .s-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.s-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.s-item.active .s-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.s-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15.5px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    transition: all 0.18s;
}

.s-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 9px;
    min-width: 18px;
    text-align: center;
}

.s-badge.warn {
    background: var(--warning);
}

.s-separator {
    height: 1px;
    background: var(--sidebar-line);
    margin: 4px 4px;
}

.sidebar-footer {
    padding: 7px 8px 10px;
    flex-shrink: 0;
    border-top: 1px solid var(--sidebar-line);
}

.s-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.s-user:hover {
    background: var(--sidebar-hover);
}

.s-u-av {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16.5px;
    flex-shrink: 0;
}

.s-u-name {
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
}

.s-u-role {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== MAIN ===== */
.main {
    margin-left: var(--sidebar-w);
    padding-top: var(--navbar-h);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.page-wrap {
    padding: 22px 24px;
}

/* ===== PAGE HEADER ===== */
.ph {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
    flex-wrap: wrap;
}

.ph-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
}

.ph-sub {
    font-size: 15.5px;
    color: var(--muted);
    margin-top: 3px;
}

.ph-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 14.5px;
}

.btn-xs {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 7px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
}

.stat-card.blue::after {
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.stat-card.green::after {
    background: var(--success);
}

.stat-card.orange::after {
    background: var(--warning);
}

.stat-card.red::after {
    background: var(--danger);
}

.stat-card.purple::after {
    background: #8b5cf6;
}

.stat-card.teal::after {
    background: #14b8a6;
}

.stat-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.orange {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-icon.teal {
    background: #ccfbf1;
    color: #0d9488;
}

.stat-val {
    font-size: 29px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.stat-lbl {
    font-size: 16.5px;
    color: var(--muted);
    margin-top: 3px;
    font-weight: 500;
}

.stat-change {
    font-size: 15.5px;
    font-weight: 600;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

.stat-change.neutral {
    color: var(--muted);
}

/* ===== CARDS ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-title i {
    color: var(--primary);
}

.card-body {
    padding: 18px;
}

.card-body-0 {
    padding: 0;
}

/* ===== TABLE ===== */
.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 15.5px;
}

.tbl thead th {
    background: #f8fafc;
    padding: 11px 14px;
    font-weight: 700;
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: left;
}

.tbl tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text);
}

.tbl tbody tr:last-child td {
    border-bottom: none;
}

.tbl tbody tr:hover {
    background: #f8fafc;
}

.tbl-scroll {
    overflow-x: auto;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 15.5px;
    font-weight: 600;
    white-space: nowrap;
}

.b-green {
    background: #d1fae5;
    color: #065f46;
}

.b-red {
    background: #fee2e2;
    color: #991b1b;
}

.b-orange {
    background: #fef3c7;
    color: #92400e;
}

.b-blue {
    background: #dbeafe;
    color: #1e40af;
}

.b-purple {
    background: #ede9fe;
    color: #5b21b6;
}

.b-gray {
    background: #f1f5f9;
    color: #475569;
}

.b-teal {
    background: #ccfbf1;
    color: #134e4a;
}

.b-yellow {
    background: #fef9c3;
    color: #713f12;
}

/* ===== FORM ===== */
.form-sect {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}

.form-sect-head {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: #fff;
    padding: 13px 20px;
    font-weight: 700;
    font-size: 16.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-sect-body {
    padding: 18px;
}

.fl {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}

.fi {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text);
    background: #fff;
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
    transition: all 0.2s;
}

.fi:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

textarea.fi {
    resize: vertical;
    min-height: 80px;
}

select.fi {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 12px;
}

select.fi:hover {
    border-color: #cbd5e1;
}

select.fi:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.fg {
    margin-bottom: 14px;
}

/* ===== TIMELINE ===== */
.timeline {
    padding-left: 4px;
}

.tl-item {
    display: flex;
    gap: 13px;
    margin-bottom: 18px;
    position: relative;
}

.tl-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 34px;
    bottom: -10px;
    width: 2px;
    background: var(--border);
}

.tl-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14.5px;
    flex-shrink: 0;
}

.tl-body {
    flex: 1;
}

.tl-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.tl-time {
    font-size: 14.5px;
    color: var(--muted);
    margin-top: 2px;
}

.tl-desc {
    font-size: 15.5px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.6;
}

/* ===== ALERT ===== */
.alert {
    display: flex;
    gap: 11px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 15.5px;
    align-items: flex-start;
}

.alert-info {
    background: #e0f2fe;
    color: #0369a1;
    border-left: 3.5px solid #0ea5e9;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 3.5px solid var(--success);
}

.alert-warn {
    background: #fef3c7;
    color: #92400e;
    border-left: 3.5px solid var(--warning);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3.5px solid var(--danger);
}

/* ===== SEARCH FILTER BAR ===== */
.sf-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.sf-search {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.sf-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15.5px;
}

.sf-search input {
    width: 100%;
    padding: 9px 12px 9px 32px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: #fff;
}

.sf-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.sf-select {
    padding: 9px 38px 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: "Aptos", "Calibri", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 12px;
    transition: all 0.2s;
}

.sf-select:hover {
    border-color: #cbd5e1;
}

.sf-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* ===== GRID ===== */
.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.grid-6040 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

@media (max-width: 900px) {
    .grid2,
    .grid-6040 {
        grid-template-columns: 1fr;
    }
    .grid3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .grid3 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== PROGRESS BAR ===== */
.prog {
    height: 5px;
    border-radius: 10px;
    background: var(--border);
    overflow: hidden;
}

.prog-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.pb-blue {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.pb-green {
    background: var(--success);
}

.pb-orange {
    background: var(--warning);
}

.pb-red {
    background: var(--danger);
}

/* ===== TOAST ===== */
.toast-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-end;
    pointer-events: none;
}

.toast {
    background: var(--dark);
    color: #fff;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 15.5px;
    font-weight: 500;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 9px;
    pointer-events: all;
    opacity: 1;
    animation: toastIn 0.3s ease forwards;
}

.toast.success {
    background: #059669;
}
.toast.warn {
    background: #d97706;
}
.toast.danger {
    background: #dc2626;
}
.toast.info {
    background: var(--primary);
}

@keyframes toastIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== MISC ===== */
.divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.empty i {
    font-size: 42px;
    opacity: 0.25;
    display: block;
    margin-bottom: 10px;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
}
.offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
}
.warn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    display: inline-block;
}

.row-gap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

/* ===== PASSWORD TOGGLE ===== */
.pwd-eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted, #94a3b8);
    font-size: 15px;
    padding: 4px 6px;
    line-height: 1;
    z-index: 2;
    outline: none;
}
.pwd-eye-btn:hover {
    color: var(--text, #1e293b);
}

.col-8 {
    flex: 0 0 calc(66.66% - 8px);
    min-width: 260px;
}

.col-4 {
    flex: 0 0 calc(33.33% - 8px);
    min-width: 200px;
}

.col-6 {
    flex: 0 0 calc(50% - 8px);
    min-width: 220px;
}

@media (max-width: 900px) {
    .col-8,
    .col-4,
    .col-6 {
        flex: 0 0 100%;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main {
        margin-left: 0;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .navbar {
        left: 0;
    }
}

/* ===== COMING SOON PAGE ===== */
.coming-soon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    flex-direction: column;
    text-align: center;
    gap: 16px;
}

.coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin-bottom: 8px;
}

.coming-soon-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
}

.coming-soon-sub {
    font-size: 16px;
    color: var(--muted);
    max-width: 400px;
    line-height: 1.6;
}

/* ===== FORM ERROR STATE ===== */
.fi.border-danger,
.fi-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* ===== GRID4 (four equal columns) ===== */
.grid4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .grid4 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== PRIORITY CARD (ticket create) ===== */
.priority-card {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--text);
}

.priority-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.priority-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

/* Sections/cards containing an open dropdown must not clip it. Re-round the
   form-sect header corners manually since we lose the overflow:hidden clip. */
.card.card-dropdown {
    overflow: visible;
}

.form-sect.form-sect-dropdown {
    overflow: visible;
}

.form-sect.form-sect-dropdown .form-sect-head {
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
}

/* ===== MULTI-SELECT DROPDOWN ===== */
[x-cloak] {
    display: none !important;
}

.msd {
    position: relative;
}

.msd-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.msd-summary {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.msd-summary.msd-placeholder {
    color: var(--muted);
}

.msd-caret {
    color: var(--muted);
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.msd-caret.msd-caret-open {
    transform: rotate(180deg);
}

.msd-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 4px;
}

.msd-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.msd-search i {
    color: var(--muted);
    font-size: 13px;
    flex-shrink: 0;
}

.msd-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--text);
    padding: 2px 0;
    font-family: inherit;
}

.msd-options {
    max-height: 220px;
    overflow-y: auto;
}

.msd-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text);
    transition: background 0.15s;
}

.msd-opt:hover {
    background: var(--bg);
}

/* Single-select rows */
.msd-opt-single {
    justify-content: space-between;
}

.msd-opt-active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.msd-check-icon {
    color: var(--primary);
    font-size: 13px;
    flex-shrink: 0;
}

.msd-opt input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.msd-note {
    color: var(--muted);
    font-size: 13px;
    margin-left: 4px;
}

.msd-empty {
    padding: 10px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}
