:root {
    --bg-main: #060608;
    --bg-sidebar: #0b0c12;
    --bg-header: #0b0c12;
    --bg-card: #0f1017;
    --bg-card-hover: #161822;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);

    --text-white: #ffffff;
    --text-primary: #ededf0;
    --text-secondary: #9a9cae;
    --text-muted: #64677a;

    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.35);
    --accent-badge: rgba(99, 102, 241, 0.15);

    --status-aberto-bg: rgba(99, 102, 241, 0.15);
    --status-aberto-text: #a5b4fc;
    --status-andamento-bg: rgba(59, 130, 246, 0.15);
    --status-andamento-text: #93c5fd;
    --status-resolvido-bg: rgba(16, 185, 129, 0.15);
    --status-resolvido-text: #6ee7b7;
    --status-fechado-bg: rgba(107, 114, 128, 0.2);
    --status-fechado-text: #9ca3af;
    --status-pago-bg: rgba(16, 185, 129, 0.15);
    --status-pago-text: #34d399;

    --sidebar-width: 255px;
    --sidebar-collapsed-width: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Background mesh from LinkJohn */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.07) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================================
   SIDEBAR
   ======================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    overflow-y: auto;
    overflow-x: hidden;
}

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

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

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    overflow: visible;
}

/* Sidebar Brand Header */
.sidebar-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

.brand-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    line-height: 1;
}

.brand-logo-text span {
    color: var(--accent-secondary);
}

.brand-badge-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.toggle-sidebar-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.toggle-sidebar-btn:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
}

.sidebar.collapsed .brand-link {
    display: none;
}

.sidebar.collapsed .brand-logo-text,
.sidebar.collapsed .brand-badge-tag {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar.collapsed .sidebar-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .toggle-sidebar-btn {
    position: static;
    transform: none;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar.collapsed .toggle-sidebar-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

/* Role Switcher Pill [ Cliente | Admin ] */
.sidebar-switcher {
    padding: 14px 14px 6px;
    transition: opacity 0.2s;
}

#sidebar-switcher:not(.is-admin) {
    display: none !important;
}

.switcher-pill {
    background: #08090e;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    padding: 4px;
    gap: 4px;
}

.switcher-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s;
    position: relative;
}

.switcher-btn:hover {
    color: var(--text-primary);
}

.switcher-btn.active {
    background: var(--bg-card);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.switcher-btn.active.admin-active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.sidebar.collapsed .sidebar-switcher {
    padding: 10px 12px 6px;
}

.sidebar.collapsed .switcher-pill {
    flex-direction: column;
    padding: 4px;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 44px;
    margin: 0 auto;
}

.sidebar.collapsed .switcher-btn {
    width: 36px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
    position: relative;
    margin: 0 auto;
}

.sidebar.collapsed .switcher-btn span {
    display: none !important;
}

.sidebar.collapsed .switcher-btn i {
    font-size: 13px;
    margin: 0;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 10px 10px 24px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar.collapsed .sidebar-nav {
    padding: 10px 0 24px;
    align-items: center;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #52566b;
    text-transform: uppercase;
    padding: 18px 12px 6px;
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-section-title {
    height: 1px;
    padding: 0;
    background: var(--border-subtle);
    margin: 10px 14px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    border: none;
    opacity: 0.6;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    color: #c3c6d4;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.nav-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
}

.nav-item-left i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.18s;
}

.nav-item:hover .nav-item-left i {
    color: var(--accent-primary);
}

.nav-badge {
    background: var(--accent-badge);
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Active Nav State */
.nav-item.active {
    background: var(--accent-gradient);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-item.active .nav-item-left i {
    color: #ffffff;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Collapsed Nav State */
.sidebar.collapsed .nav-item {
    width: 44px;
    height: 44px;
    margin: 3px auto;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.sidebar.collapsed .nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-1px);
}

.sidebar.collapsed .nav-item.active {
    width: 44px;
    height: 44px;
    margin: 3px auto;
    padding: 0;
    border-radius: 12px;
    background: var(--accent-gradient);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.sidebar.collapsed .nav-item-left {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.sidebar.collapsed .nav-item-left span,
.sidebar.collapsed .nav-badge {
    display: none !important;
}

.sidebar.collapsed .nav-item-left i {
    font-size: 17px;
    width: auto;
    text-align: center;
    color: #a0a4b8;
    margin: 0;
    transition: all 0.18s;
}

.sidebar.collapsed .nav-item:hover .nav-item-left i,
.sidebar.collapsed .nav-item.active .nav-item-left i {
    color: #ffffff;
}

/* Floating Tooltips on Hover (Collapsed State) */
.sidebar.collapsed .nav-item[data-tooltip]::after,
.sidebar.collapsed .switcher-btn[data-tooltip]::after,
.sidebar.collapsed .toggle-sidebar-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: #141622;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 9999;
}

.sidebar.collapsed .nav-item[data-tooltip]::before,
.sidebar.collapsed .switcher-btn[data-tooltip]::before,
.sidebar.collapsed .toggle-sidebar-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 6px 5px 0;
    border-style: solid;
    border-color: transparent #141622 transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s;
    pointer-events: none;
    z-index: 9999;
}

.sidebar.collapsed .nav-item[data-tooltip]:hover::after,
.sidebar.collapsed .switcher-btn[data-tooltip]:hover::after,
.sidebar.collapsed .toggle-sidebar-btn[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.sidebar.collapsed .nav-item[data-tooltip]:hover::before,
.sidebar.collapsed .switcher-btn[data-tooltip]:hover::before,
.sidebar.collapsed .toggle-sidebar-btn[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ========================================================
   MAIN CONTENT WRAPPER
   ======================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Navbar */
.topbar {
    height: 68px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-mode-pill {
    background: var(--accent-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    display: none;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.admin-mode-pill.show {
    display: inline-block;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* User Profile Badge */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 12px 5px 6px;
    background: #08090e;
    border: 1px solid var(--border-color);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.user-profile-badge:hover {
    border-color: var(--accent-primary);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.user-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: 54px;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 220px;
    padding: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.user-dropdown.show {
    display: flex;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ========================================================
   CONTENT PAGES / VIEWS
   ======================================================== */
.content-area {
    padding: 32px 36px 60px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.page-title-group h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.page-title-group p {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: #12141c;
    border: 1px solid var(--border-color);
    color: #e5e7eb;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #181b26;
    border-color: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* Stat Cards */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #141622;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-primary);
}

/* Filter Tabs */
.filter-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 7px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

.tab-btn:hover {
    color: #fff;
    border-color: rgba(99, 102, 241, 0.4);
}

.tab-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* Search Bar */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 14px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    min-width: 260px;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--accent-primary);
}

.btn-search {
    background: #12141c;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

/* Table Container */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background: #0b0d14;
    color: #71758a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px 20px;
    font-size: 13.5px;
    color: #e5e7eb;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status & Priority Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-aberto {
    background: var(--status-aberto-bg);
    color: var(--status-aberto-text);
}
.status-aberto .status-dot { background: var(--accent-primary); }

.status-andamento {
    background: var(--status-andamento-bg);
    color: var(--status-andamento-text);
}
.status-andamento .status-dot { background: #3b82f6; }

.status-resolvido {
    background: var(--status-resolvido-bg);
    color: var(--status-resolvido-text);
}
.status-resolvido .status-dot { background: #10b981; }

.status-fechado {
    background: var(--status-fechado-bg);
    color: var(--status-fechado-text);
}
.status-fechado .status-dot { background: #9ca3af; }

.status-pago {
    background: var(--status-pago-bg);
    color: var(--status-pago-text);
}
.status-pago .status-dot { background: #10b981; }

.priority-alta, .priority-urgente {
    color: #f87171;
    font-weight: 600;
}
.priority-normal {
    color: #818cf8;
    font-weight: 500;
}
.priority-baixa {
    color: #34d399;
    font-weight: 500;
}

.action-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    cursor: pointer;
}

.action-link:hover {
    color: var(--accent-primary);
}

/* Ticket Thread */
.ticket-thread-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.ticket-thread-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.ticket-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.ticket-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.message-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px 24px;
}

.message-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1c1f2e;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar.admin-avatar {
    background: var(--accent-gradient);
}

.author-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.author-role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent-badge);
    color: #a5b4fc;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
}

.message-content {
    font-size: 14px;
    line-height: 1.6;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Reply Box */
.reply-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 24px;
}

.reply-textarea {
    width: 100%;
    min-height: 110px;
    background: #08090e;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
    resize: vertical;
    margin-bottom: 14px;
}

.reply-textarea:focus {
    border-color: var(--accent-primary);
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 22px;
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.modal-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: #08090e;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 14px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--accent-primary);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--accent-gradient);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 25px var(--accent-glow);
    display: none;
    z-index: 2000;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   RESPONSIVENESS & MOBILE-FIRST OPTIMIZATIONS
   ======================================================== */

/* Mobile Hamburger Button in Topbar */
.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
    flex-shrink: 0;
}

.mobile-toggle-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Close button inside mobile sidebar */
.mobile-close-sidebar-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-close-sidebar-btn:hover {
    background: var(--bg-card);
    color: #fff;
    border-color: var(--accent-primary);
}

/* Sidebar Backdrop for Mobile Drawer */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Responsive Cards Grid Utility */
.cards-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

/* ========================================================
   DASHBOARD HERO, SALES SHOWCASE & SUPPORT SPOTLIGHT
   ======================================================== */
.dash-hero-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 50%, rgba(15, 16, 23, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.dash-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.dash-hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 10px #34d399;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

.dash-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.dash-hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 580px;
    line-height: 1.5;
}

.dash-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* Promo Callout Bar */
.promo-callout {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px dashed rgba(168, 85, 247, 0.45);
    border-radius: 14px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.promo-callout-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #e5e7eb;
}

.promo-coupon-tag {
    background: #08090e;
    border: 1px solid var(--accent-primary);
    color: #a5b4fc;
    font-family: monospace;
    font-weight: 800;
    font-size: 13.5px;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.promo-callout.theme-warning {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}
.promo-callout.theme-warning .promo-coupon-tag {
    border-color: #f59e0b;
    color: #fde68a;
}

.promo-callout.theme-info {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.12);
}
.promo-callout.theme-info .promo-coupon-tag {
    border-color: #38bdf8;
    color: #bae6fd;
}

.promo-callout.theme-success {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
}
.promo-callout.theme-success .promo-coupon-tag {
    border-color: #10b981;
    color: #a7f3d0;
}

.dash-hero-badge.badge-maintenance {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}
.dash-hero-badge.badge-maintenance .pulse-dot {
    background: #fbbf24;
    box-shadow: 0 0 10px #fbbf24;
}

.dash-hero-badge.badge-incident {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}
.dash-hero-badge.badge-incident .pulse-dot {
    background: #f87171;
    box-shadow: 0 0 10px #f87171;
}

/* Campaign Editor in Admin Dashboard */
.campaign-editor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.campaign-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 12px;
}

.campaign-editor-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.live-preview-box {
    background: #090a10;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    padding: 20px;
    margin-top: 14px;
}

/* Sales Showcase Grid & Cards */
.sales-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sales-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.sales-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(99, 102, 241, 0.18);
}

.sales-card-header {
    margin-bottom: 14px;
}

.sales-card-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.sales-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.sales-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sales-features-list {
    list-style: none;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 12.5px;
    color: #d1d5db;
}

.sales-features-list li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.sales-features-list li i {
    color: var(--accent-primary);
    width: 14px;
    font-size: 12px;
}

.sales-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}

.sales-price-val {
    font-family: 'Outfit', sans-serif;
    font-size: 23px;
    font-weight: 800;
    color: #a5b4fc;
}

.sales-price-cycle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Support Spotlight Section */
.support-spotlight {
    background: linear-gradient(135deg, #0e101a 0%, #131522 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.support-spotlight-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.support-expert-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    flex-shrink: 0;
}

.support-expert-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    background: #34d399;
    border: 2px solid #0f1017;
    border-radius: 50%;
}

.support-spotlight-title {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.support-spotlight-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.support-spotlight-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.support-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.support-chip:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

.ticket-tracker-card {
    background: rgba(15, 17, 26, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ticket-tracker-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(20, 24, 38, 0.95);
    transform: translateY(-1px);
}

/* Executive Operational Report & Telemetry Card */
.telemetry-card {
    background: linear-gradient(135deg, rgba(14, 16, 26, 0.98) 0%, rgba(19, 23, 38, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 18px;
    padding: 24px 28px;
    margin-bottom: 26px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.telemetry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.telemetry-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.telemetry-header-title h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.telemetry-item {
    background: rgba(8, 9, 14, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
}

.telemetry-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(12, 14, 22, 0.85);
}

.telemetry-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
}

.telemetry-item-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 7px;
}

.telemetry-item-val {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
}

.telemetry-progress-bg {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.telemetry-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.telemetry-footer-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

.telemetry-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 11.5px;
}

/* Sales Filter Bar */
.sales-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.sales-filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sales-filter-btn:hover {
    color: #fff;
    border-color: rgba(99, 102, 241, 0.4);
}

.sales-filter-btn.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.sales-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.sales-card-actions .btn-primary {
    flex: 1;
    justify-content: center;
    font-size: 13.5px;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
}

.sales-card-actions .btn-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #25d366;
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sales-card-actions .btn-whatsapp:hover {
    background: #25d366;
    color: #000;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

/* Custom Architecture Consult Banner */
.consult-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 50%, rgba(15, 17, 26, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 18px;
    padding: 26px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.consult-banner-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}

.consult-banner-content p {
    font-size: 13.5px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.5;
}

/* Table scroll wrapper for mobile */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.custom-table th,
.custom-table td {
    white-space: nowrap;
}

/* Tablet & Mobile Breakpoint (<= 900px) */
@media (max-width: 900px) {
    .dash-hero-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 18px;
        gap: 18px;
    }

    .dash-hero-title {
        font-size: 22px;
    }

    .dash-hero-actions {
        width: 100%;
    }

    .dash-hero-actions .btn-primary,
    .dash-hero-actions .btn-secondary {
        flex: 1;
        justify-content: center;
    }

    .promo-callout {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .support-spotlight {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 18px;
        gap: 18px;
    }

    .support-spotlight-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .support-spotlight-actions button,
    .support-spotlight-actions a {
        width: 100%;
        justify-content: center;
    }

    .telemetry-card {
        padding: 20px 16px;
    }

    .telemetry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .telemetry-grid {
        grid-template-columns: 1fr;
    }

    .consult-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 18px;
        gap: 16px;
    }

    .consult-banner a {
        width: 100%;
        justify-content: center;
    }

    .mobile-toggle-btn {
        display: inline-flex;
    }

    .toggle-sidebar-btn {
        display: none !important;
    }

    .mobile-close-sidebar-btn {
        display: inline-flex;
    }

    /* Convert sidebar into smooth off-canvas drawer */
    .sidebar {
        width: 280px !important;
        max-width: 86vw;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 12px 0 35px rgba(0, 0, 0, 0.85);
        z-index: 100;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Main wrapper takes full width on mobile */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100%;
        min-width: 0;
    }

    .topbar {
        padding: 0 16px;
        height: 62px;
    }

    .content-area {
        padding: 20px 14px 60px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .page-header .btn-primary {
        width: 100%;
        justify-content: center;
    }

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

    .filter-tabs-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .search-box {
        width: 100%;
    }

    .search-input {
        flex: 1;
        min-width: 0;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-container {
        padding: 22px 18px;
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: 92vh;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-footer button {
        width: 100%;
        justify-content: center;
    }

    .ticket-thread-header {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    .ticket-header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ticket-header-actions .btn-secondary,
    .ticket-header-actions .btn-primary {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        text-align: center;
    }

    .user-email {
        display: none;
    }

    .user-profile-badge {
        padding: 4px 10px 4px 4px;
        gap: 8px;
    }

    .user-dropdown {
        right: 10px;
        width: 200px;
    }
}

/* Small Smartphone Breakpoint (<= 600px) */
@media (max-width: 600px) {
    .stat-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cards-grid-auto {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .message-author-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Tiny Smartphone Breakpoint (<= 480px) */
@media (max-width: 480px) {
    .topbar-title {
        font-size: 15px;
        max-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-name {
        display: none;
    }

    .user-profile-badge {
        padding: 4px;
        border-radius: 50%;
    }

    .admin-mode-pill {
        display: none !important;
    }

    .page-title-group h1 {
        font-size: 21px;
    }

    .stat-card {
        padding: 16px 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .message-card {
        padding: 15px;
    }

    .reply-card {
        padding: 15px;
    }

    .reply-textarea {
        min-height: 90px;
        padding: 10px;
    }

    .reply-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .toast-notice {
        left: 14px;
        right: 14px;
        bottom: 14px;
        text-align: center;
    }
}

/* ========================================================
   MARKETPLACE / LOJA DE SERVIÇOS (MERCADO LIVRE STYLE)
   ======================================================== */
.marketplace-container {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    margin-top: 14px;
}

/* Sidebar Filtros (Estilo Mercado Livre) */
.marketplace-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #0b0c13;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 86px;
}

.marketplace-filter-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.marketplace-filter-title {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.marketplace-filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.marketplace-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid transparent;
}

.marketplace-filter-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.marketplace-filter-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-weight: 600;
    border-color: rgba(99, 102, 241, 0.3);
}

.marketplace-count-badge {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 7px;
    border-radius: 10px;
}

/* Price Range Inputs */
.price-inputs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.price-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.price-input-wrapper span {
    position: absolute;
    left: 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.price-input-wrapper input {
    width: 100%;
    background: #07070b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    padding: 7px 6px 7px 24px;
    outline: none;
    transition: border-color 0.2s;
}

.price-input-wrapper input:focus {
    border-color: var(--accent-primary);
}

.btn-price-apply {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 12px;
}

.btn-price-apply:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Marketplace Main Area */
.marketplace-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Marketplace Topbar (Busca + Contador + Ordenar por) */
.marketplace-topbar {
    background: #0b0c13;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.marketplace-search {
    flex: 1;
    min-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
}

.marketplace-search i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 13px;
}

.marketplace-search input {
    width: 100%;
    background: #07070b;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: #fff;
    padding: 9px 14px 9px 36px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.marketplace-search input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.marketplace-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.marketplace-sort-label {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

.marketplace-sort-select {
    background: #07070b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 30px 8px 12px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9cae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

.marketplace-sort-select:focus {
    border-color: var(--accent-primary);
}

/* Product Cards Grid (Mercado Livre Style) */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.product-shop-card {
    background: #0d0e17;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-shop-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.15);
}

.product-shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    margin-bottom: 12px;
}

.product-shop-badge.pix-fast {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.25);
}

.product-shop-title {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 8px;
}

.product-shop-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 38px;
}

.product-shop-specs {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 0;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #c9ccd8;
}

.product-shop-specs-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-shop-specs-item i {
    width: 16px;
    color: var(--accent-primary);
    text-align: center;
    font-size: 12px;
}

/* Pricing Area */
.product-shop-pricing {
    margin-top: auto;
    margin-bottom: 16px;
}

.product-shop-price-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-shop-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

.product-shop-price-currency {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ededf0;
}

.product-shop-price-value {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.product-shop-price-period {
    font-size: 13px;
    color: #9a9cae;
    font-weight: 500;
}

.product-shop-pix-tag {
    font-size: 11.5px;
    color: #34d399;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}

.product-shop-actions {
    display: flex;
    gap: 8px;
}

.btn-shop-buy {
    flex: 1;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 16px;
    border-radius: 9px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px var(--accent-glow);
    border: none;
    cursor: pointer;
}

.btn-shop-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--accent-glow);
    color: #fff;
}

@media (max-width: 991px) {
    .marketplace-container {
        flex-direction: column;
    }
    .marketplace-sidebar {
        width: 100%;
        position: static;
        padding: 16px;
    }
    .marketplace-filter-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 6px;
    }
}

