/* ============================================
   SUPREAL HELPDESK - MODERN DESIGN SYSTEM
   Redesign overlay - does not modify original CSS
   ============================================ */

/* === CSS Variables === */
:root {
    --primary_color: #2A85FF;
    --bg-body: #F7F8FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-sidebar-hover: #F4F4F4;
    --bg-sidebar-active: #E8F1FF;
    --text-primary: #1A1D1F;
    --text-secondary: #6F767E;
    --text-muted: #9A9FA5;
    --border-color: #EFEFEF;
    --border-light: #F4F4F4;
    --rd-primary: #2A85FF;
    --rd-primary-hover: #1A75EF;
    --rd-primary-light: #E8F1FF;
    --rd-success: #83BF6E;
    --rd-success-light: #EAFAE4;
    --rd-warning: #FFBC99;
    --rd-warning-light: #FFF4EE;
    --rd-info: #8E59FF;
    --rd-info-light: #F0EAFF;
    --rd-danger: #FF6A55;
    --rd-danger-light: #FFEBE8;
    --rd-secondary: #CABDFF;
    --rd-secondary-light: #F5F3FF;
    --rd-orange: #FF6A55;
    --rd-orange-light: #FFEBE8;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-sidebar: 2px 0 8px rgba(0, 0, 0, 0.04);
    --shadow-navbar: 0 1px 4px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 50px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --sidebar-width: 220px;
    --navbar-height: 80px;
    --transition: all 0.2s ease;
}

/* === Google Fonts Import === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === Body & Global === */
body {
    background-color: var(--bg-body) !important;
    font-family: var(--font-family) !important;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* ============================================
   NAVBAR (Agent / Dashboard)
   ============================================ */
.nav-bar.v2 {
    --primary_color: #2D6A4F;
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-navbar) !important;
    z-index: 1030;
}

.nav-bar.v2 .nav-bar-container {
    align-items: center;
}

.nav-bar.v2 .logo img {
    max-height: 50px;
}

.nav-bar.v2 .nav-btn,
.nav-bar.v2 .dash-sidebar-toggle .nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary) !important;
    transition: var(--transition);
}

.nav-bar.v2 .nav-btn:hover,
.nav-bar.v2 .dash-sidebar-toggle .nav-btn:hover {
    background: var(--bg-body);
    color: var(--text-primary) !important;
}

/* Fix colors for light navbar (was white for dark theme) */
.dash-sidebar-toggle {
    color: var(--text-secondary) !important;
}

.nav-bar.v2 .drop-down .drop-down-btn {
    color: var(--text-secondary) !important;
}

.nav-bar.v2 .user-info-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-bar.v2 .user-name {
    color: var(--text-primary) !important;
    font-weight: 500;
}

.nav-bar.v2 .user-branch {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-bar.v2 .user-branch i {
    font-size: 0.6rem;
    opacity: 0.7;
}

.nav-bar.v2 .noti-btn {
    position: relative;
}

.nav-bar.v2 .noti-counter {
    background: var(--rd-danger) !important;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Notification dropdown */
.nav-bar.v2 .drop-down-menu {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.nav-bar.v2 .noti .noti-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
}

.nav-bar.v2 .noti .noti-header h6 {
    font-weight: 600;
    color: var(--text-primary);
}

.nav-bar.v2 .noti .noti-footer {
    border-top: 1px solid var(--border-color);
}

.nav-bar.v2 .noti .noti-footer a {
    color: #2D6A4F;
    font-weight: 600;
    font-size: 13px;
}

.nav-bar.v2 .noti-item {
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-bar.v2 .noti-item:hover {
    background: var(--bg-body);
}

.nav-bar.v2 .noti-item.unread {
    background: #E0F2E9;
}

/* ============================================
   SIDEBAR (Agent Dashboard)
   ============================================ */
.dash-sidebar {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

.dash-sidebar-inner {
    background: var(--bg-sidebar) !important;
}

.dash-sidebar-menu {
    padding: 16px 12px !important;
}

.dash-sidebar-links:not(:last-child) {
    margin-bottom: 16px !important;
}

.dash-sidebar-link:not(:last-child) {
    margin-bottom: 2px !important;
}

.dash-sidebar-link .dash-sidebar-link-anchor {
    display: flex;
    align-items: center;
    padding: 10px 14px !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
    text-decoration: none !important;
}

.dash-sidebar-link .dash-sidebar-link-anchor:hover {
    background: var(--bg-sidebar-hover) !important;
    color: var(--text-primary) !important;
}

.dash-sidebar-link.current .dash-sidebar-link-anchor {
    background: var(--bg-sidebar-active) !important;
    color: var(--rd-primary) !important;
    font-weight: 600 !important;
}

.dash-sidebar-link .dash-sidebar-link-icon {
    width: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-sidebar-link .dash-sidebar-link-icon i {
    font-size: 15px !important;
}

.dash-sidebar-link.current .dash-sidebar-link-icon {
    color: var(--rd-primary) !important;
}

.dash-sidebar-link .dash-sidebar-link-text {
    font-size: 13px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.dash .content {
    background: var(--bg-body) !important;
}

.dash-contain {
    padding: 24px 32px !important;
}

.dash-contain h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--text-secondary) !important;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted) !important;
}

/* ============================================
   CARDS
   ============================================ */
.card,
.card-v {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-card-hover) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px 20px !important;
}

.card-body {
    padding: 20px !important;
}

.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--border-color) !important;
}

/* ============================================
   STAT CARDS (Dashboard)
   ============================================ */
.stat-card {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
    border-left-width: 4px !important;
    transition: var(--transition) !important;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover) !important;
}

.stat-card .card-body {
    padding: 20px !important;
}

.stat-card h3 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
}

.stat-card p {
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

.stat-card i {
    opacity: 0.15 !important;
}

.stat-card.primary {
    border-left-color: var(--rd-primary) !important;
}

.stat-card.primary h3 {
    color: var(--rd-primary) !important;
}

.stat-card.success {
    border-left-color: var(--rd-success) !important;
}

.stat-card.success h3 {
    color: var(--rd-success) !important;
}

.stat-card.info {
    border-left-color: var(--rd-info) !important;
}

.stat-card.info h3 {
    color: var(--rd-info) !important;
}

.stat-card.warning {
    border-left-color: var(--rd-warning) !important;
}

.stat-card.warning h3 {
    color: var(--rd-orange) !important;
}

.stat-card.danger {
    border-left-color: var(--rd-danger) !important;
}

.stat-card.danger h3 {
    color: var(--rd-danger) !important;
}

/* Performance metrics */
.performance-metric {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
}

.performance-metric:hover {
    box-shadow: var(--shadow-card-hover) !important;
    transform: translateY(-2px);
}

.performance-metric h4 {
    color: var(--rd-primary) !important;
    font-weight: 700 !important;
}

.performance-metric p {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

/* Chart containers */
.chart-container {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
}

.chart-container h5 {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

/* Recent activity */
.recent-activity {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
    padding: 20px !important;
}

.recent-activity h5 {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.activity-item {
    border-bottom: 1px solid var(--border-light) !important;
    padding: 12px 8px !important;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.activity-item:last-child {
    border-bottom: none !important;
}

a:hover .activity-item {
    background: var(--bg-body);
}

.activity-item h6 a {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.activity-item h6 a:hover {
    color: var(--rd-primary) !important;
}

@media (max-width: 767.98px) {
    .recent-activity {
        padding: 14px !important;
    }

    .activity-item {
        padding: 10px 4px !important;
    }
}

@media (max-width: 575.98px) {
    .recent-activity {
        padding: 12px !important;
    }

    .activity-item {
        padding: 8px 2px !important;
    }
}

/* ============================================
   TABLES
   ============================================ */
.dash-table {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.dash-table .table {
    margin-bottom: 0;
}

.dash-table .table thead th {
    background: var(--bg-body) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 16px !important;
    white-space: nowrap;
}

.dash-table .table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    font-size: 14px !important;
    vertical-align: middle !important;
}

.dash-table .table tbody tr:last-child td {
    border-bottom: none !important;
}

.dash-table .table tbody tr {
    transition: var(--transition);
}

.dash-table .table tbody tr:hover {
    background: var(--bg-body) !important;
}

.dash-table .table tbody td a {
    color: var(--rd-primary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.dash-table .table tbody td a.text-dark {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

.dash-table .table tbody td a.text-dark:hover {
    color: var(--rd-primary) !important;
}

/* Table in branch section */
.table-hover tbody tr:hover {
    background: var(--bg-body) !important;
}

.table-light,
.table thead.table-light th {
    background: var(--bg-body) !important;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 10px !important;
    border-radius: var(--radius-sm) !important;
    letter-spacing: 0.2px;
}

.badge.bg-success {
    background-color: var(--rd-success-light) !important;
    color: #3A7D2A !important;
}

.badge.bg-info {
    background-color: var(--rd-info-light) !important;
    color: #6B3FCC !important;
}

.badge.bg-warning {
    background-color: var(--rd-warning-light) !important;
    color: #B86E00 !important;
}

.badge.bg-danger {
    background-color: var(--rd-danger-light) !important;
    color: #CC3A2A !important;
}

.badge.bg-primary {
    background-color: var(--rd-primary-light) !important;
    color: var(--rd-primary) !important;
}

.badge.bg-secondary {
    background-color: var(--rd-secondary-light) !important;
    color: #6B3FCC !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    padding: 8px 16px !important;
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 13px !important;
}

.btn-md {
    padding: 10px 20px !important;
}

.btn-lg {
    padding: 12px 28px !important;
    font-size: 16px !important;
    border-radius: var(--radius-lg) !important;
}

.btn-primary {
    background-color: var(--rd-primary) !important;
    border-color: var(--rd-primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--rd-primary-hover) !important;
    border-color: var(--rd-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(42, 133, 255, 0.3) !important;
}

.btn-outline-primary {
    color: var(--rd-primary) !important;
    border-color: var(--rd-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--rd-primary) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

.btn-outline-secondary:hover {
    background-color: var(--bg-body) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.btn-outline-danger {
    color: var(--rd-danger) !important;
    border-color: var(--rd-danger) !important;
}

.btn-outline-danger:hover {
    background-color: var(--rd-danger) !important;
    color: #fff !important;
}

.btn-outline-info {
    color: var(--rd-info) !important;
    border-color: var(--rd-info) !important;
}

.btn-outline-info:hover {
    background-color: var(--rd-info) !important;
    color: #fff !important;
}

.btn-secondary {
    background-color: var(--bg-body) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

.btn-secondary:hover {
    background-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */
.form-control,
.form-select {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: var(--text-primary) !important;
    background-color: var(--bg-card) !important;
    transition: var(--transition) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--rd-primary) !important;
    box-shadow: 0 0 0 3px rgba(42, 133, 255, 0.12) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 6px !important;
}

.form-check-input {
    border-radius: 4px !important;
    border: 1.5px solid var(--border-color) !important;
}

.form-check-input:checked {
    background-color: var(--rd-primary) !important;
    border-color: var(--rd-primary) !important;
}

.form-check-label {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
}

.form-search {
    position: relative;
}

.form-search .form-control {
    padding-left: 40px !important;
}

.form-search .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    gap: 4px;
    margin-top: 20px !important;
}

.pagination .page-item .page-link {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 8px 14px !important;
    transition: var(--transition) !important;
    min-width: 38px;
    text-align: center;
}

.pagination .page-item .page-link:hover {
    background-color: #D8F3DC !important;
    color: #40916C !important;
    border-color: #40916C !important;
}

.pagination .page-item.active .page-link {
    background-color: #40916C !important;
    border-color: #40916C !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(64, 145, 108, 0.25) !important;
}

.pagination .page-item.disabled .page-link {
    background-color: var(--bg-body) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    border-radius: var(--radius-xl) !important;
    border: none !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 20px 24px !important;
}

.modal-header .modal-title {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: var(--text-primary) !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
    padding: 16px 24px !important;
}

/* ============================================
   COUNTER CARDS (User Dashboard)
   ============================================ */
.counter .card-v {
    padding: 20px !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.counter .counter-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.counter-success .counter-icon {
    background: var(--rd-success-light);
    color: var(--rd-success);
}

.counter-info .counter-icon {
    background: var(--rd-info-light);
    color: var(--rd-info);
}

.counter-warning .counter-icon {
    background: var(--rd-warning-light);
    color: #B86E00;
}

.counter-danger .counter-icon {
    background: var(--rd-danger-light);
    color: var(--rd-danger);
}

.counter .counter-meta h3 {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 4px !important;
}

.counter .counter-meta p {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

/* ============================================
   LIST GROUP (Mobile ticket list)
   ============================================ */
.list-group-item {
    border: none !important;
    border-bottom: 1px solid var(--border-light) !important;
    padding: 14px 16px !important;
    transition: var(--transition);
}

.list-group-item:hover {
    background: var(--bg-body) !important;
}

.list-group-item:last-child {
    border-bottom: none !important;
}

/* ============================================
   ALERT
   ============================================ */
.alert {
    border-radius: var(--radius-lg) !important;
    border: none !important;
    font-size: 14px;
}

.alert-info {
    background-color: var(--rd-primary-light) !important;
    color: var(--rd-primary) !important;
}

/* ============================================
   SECTION (User/Homepage)
   ============================================ */
.section {
    background: var(--bg-body);
}

.section-header h2 {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.section-header h4 {
    font-weight: 700 !important;
}

/* ============================================
   HOMEPAGE HEADER
   ============================================ */
.header .wrapper {
    background-color: var(--rd-primary) !important;
}

.header .header-title {
    font-weight: 700 !important;
}

.header .header-search .search-input {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.header .header-search .search-input input {
    border-radius: var(--radius-lg) !important;
    padding: 14px 20px 14px 48px !important;
    font-size: 15px;
}

.header .header-shape .shape-fill {
    fill: var(--bg-body);
}

/* Knowledge base cards */
.categories .categories-header {
    margin-bottom: 12px;
}

.categories .categories-title {
    font-weight: 700 !important;
    font-size: 16px !important;
}

.categories .categories-body .category {
    padding: 8px 0 !important;
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    transition: var(--transition);
}

.categories .categories-body .category:hover {
    color: var(--rd-primary) !important;
}

.categories .categories-footer a {
    color: var(--rd-primary) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* ============================================
   USER MENU / DROPDOWN
   ============================================ */
.user-menu .user-menu-btn {
    border-radius: var(--radius-md);
    padding: 4px 8px;
    transition: var(--transition);
}

.user-menu .user-menu-btn:hover {
    background: var(--bg-body);
}

.user-menu .user-menu-btn img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.user-menu .drop-down-menu {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.drop-down .drop-down-menu .drop-down-item {
    color: var(--text-primary) !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.drop-down .drop-down-menu .drop-down-item:hover {
    background-color: var(--rd-primary-light) !important;
    color: var(--rd-primary) !important;
}

.drop-down .drop-down-menu .drop-down-item.text-danger:hover {
    background-color: var(--rd-danger-light) !important;
    color: var(--rd-danger) !important;
}

/* ============================================
   AGENT TICKETS - FILTER PILLS
   ============================================ */
.dash-contain .d-flex.flex-wrap.gap-2 .btn {
    border-radius: var(--radius-pill) !important;
    font-size: 13px !important;
    padding: 6px 16px !important;
}

/* Status counter cards in tickets page */
.row-cols-md-5 .card-v.p-2 {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    padding: 10px 14px !important;
    transition: var(--transition);
}

.row-cols-md-5 .card-v.p-2:hover {
    border-color: var(--rd-primary);
    box-shadow: var(--shadow-card-hover);
}

.row-cols-md-5 .card-v.p-2 small {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* ============================================
   PAGE HEADER (Dashboard welcome)
   ============================================ */
.page-header h2 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.page-header p {
    color: var(--text-secondary) !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

/* Smooth transitions globally */
.card-v, .stat-card, .btn, .badge, .dash-sidebar-link .dash-sidebar-link-anchor {
    transition: all 0.2s ease !important;
}

/* Scrollable tables on mobile */
.dash-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1199.98px) {
    .dash-contain {
        padding: 16px !important;
    }
}

@media (max-width: 767.98px) {
    /* Navbar v2 compact */
    .nav-bar.v2 {
        padding: 4px 0 !important;
    }

    .nav-bar.v2 .logo img {
        max-height: 38px;
    }

    .nav-bar.v2 .nav-btn,
    .nav-bar.v2 .dash-sidebar-toggle .nav-btn {
        width: 36px;
        height: 36px;
    }

    .nav-bar.v2 .dash-sidebar-toggle {
        margin-right: 8px !important;
    }

    /* User menu compact */
    .user-menu .user-name {
        display: none;
    }

    .user-menu .fa-angle-down {
        display: none;
    }

    .user-menu .drop-down-btn {
        padding: 0 !important;
    }

    /* Main content area */
    .dash-contain {
        padding: 12px !important;
    }

    .dash-contain h2 {
        font-size: 1.25rem !important;
    }

    /* Breadcrumb compact */
    .breadcrumb {
        font-size: 12px !important;
        margin-bottom: 0 !important;
    }

    /* Stat cards compact */
    .stat-card .card-body {
        padding: 12px !important;
    }

    .stat-card h3 {
        font-size: 1.25rem !important;
    }

    .stat-card p {
        font-size: 11px !important;
    }

    /* Performance metrics compact */
    .performance-metric {
        padding: 12px !important;
    }

    .performance-metric h4 {
        font-size: 1.25rem !important;
    }

    .performance-metric p {
        font-size: 11px !important;
    }

    /* Charts compact */
    .chart-container {
        padding: 12px !important;
        min-height: 200px !important;
    }

    /* Counter cards */
    .counter .card-v {
        padding: 12px !important;
        gap: 10px;
    }

    .counter .counter-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .counter .counter-meta p {
        font-size: 1.25rem !important;
    }

    /* Badges */
    .badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }

    /* Touch-friendly buttons */
    .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
        min-height: 36px;
    }

    .btn {
        min-height: 36px;
    }

    /* Filter pills */
    .dash-contain .d-flex.flex-wrap.gap-2 .btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }

    /* Status counter cards (tickets page) */
    .row-cols-md-5 .card-v.p-2 {
        padding: 8px 10px !important;
    }

    .row-cols-md-5 .card-v.p-2 small {
        font-size: 12px !important;
    }

    /* Tables - horizontal scroll */
    .dash-table .table {
        min-width: 600px;
    }

    .dash-table th,
    .dash-table td {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    /* Card spacing */
    .card-v {
        border-radius: var(--radius-md) !important;
    }

    /* Footer compact */
    .footer {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }

    /* Sidebar overlay smooth */
    .dash-sidebar .overlay {
        transition: opacity 0.3s ease !important;
    }

    .dash-sidebar-inner {
        transition: transform 0.3s ease !important;
    }
}

@media (max-width: 575.98px) {
    .nav-bar.v2 .logo img {
        max-height: 32px;
    }

    .dash-contain {
        padding: 10px !important;
    }

    .dash-contain h2 {
        font-size: 1.1rem !important;
    }

    .stat-card .card-body {
        padding: 10px !important;
    }

    .stat-card h3 {
        font-size: 1.1rem !important;
    }

    .stat-card i {
        font-size: 1.25rem !important;
    }

    .counter .card-v {
        padding: 10px !important;
    }

    .counter .counter-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .counter .counter-meta h3 {
        font-size: 12px !important;
    }

    .counter .counter-meta p {
        font-size: 1.1rem !important;
    }

    /* Even more compact status cards */
    .row-cols-md-5 .card-v.p-2 {
        padding: 6px 8px !important;
    }

    .row-cols-md-5 .card-v.p-2 small {
        font-size: 11px !important;
    }

    /* Tables */
    .dash-table th,
    .dash-table td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* ============================================
   MAIN NAVBAR (Homepage/Public)
   ============================================ */
.nav-bar:not(.v2) {
    background: var(--bg-card) !important;
    box-shadow: var(--shadow-navbar) !important;
    border-bottom: 1px solid var(--border-color);
}

.nav-bar:not(.v2) .logo img {
    max-height: 50px;
}

.nav-bar:not(.v2) .link .link-title span {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: var(--transition);
}

.nav-bar:not(.v2) .link:hover .link-title span {
    color: var(--rd-primary) !important;
}

.nav-bar:not(.v2) .link-btn .btn {
    border-radius: var(--radius-md) !important;
}

/* ============================================
   DROP-DOWN (Generic)
   ============================================ */
.drop-down .drop-down-menu {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid var(--border-color) !important;
}

.drop-down .drop-down-item {
    padding: 8px 16px !important;
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    transition: var(--transition);
}

.drop-down .drop-down-item:hover {
    background: var(--bg-body) !important;
    color: var(--rd-primary) !important;
}

/* ============================================
   TOASTR OVERRIDE
   ============================================ */
.toast-success {
    background-color: var(--rd-success) !important;
}

.toast-error {
    background-color: var(--rd-danger) !important;
}

.toast-info {
    background-color: var(--rd-primary) !important;
}

.toast-warning {
    background-color: #FFBC99 !important;
    color: #1A1D1F !important;
}

/* ============================================
   INTERNAL TICKETS MODAL (Dashboard)
   ============================================ */
#internalTicketsModal .modal-content {
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
}

#internalTicketsModal .card {
    border-radius: var(--radius-lg) !important;
}

/* ============================================
   HOMEPAGE CTA CARD
   ============================================ */
.section-body > .card-v.p-5 {
    border-radius: var(--radius-xl) !important;
    background: linear-gradient(135deg, var(--bg-card), var(--rd-primary-light)) !important;
}

.section-body > .card-v.p-5 h4 {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

/* ============================================
   KNOWLEDGE BASE SECTION
   ============================================ */
.section-title h3 {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.section-title-divider {
    background: var(--rd-primary) !important;
    height: 3px !important;
    width: 40px !important;
    border-radius: 2px;
    margin-top: 8px;
}

/* ============================================
   MISC / UTILITIES
   ============================================ */
.text-muted {
    color: var(--text-muted) !important;
}

h4.mb-0 {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

/* Smooth transitions on all interactive elements */
a, button, .btn, input, select, textarea {
    transition: var(--transition);
}

/* Better focus indicators */
*:focus-visible {
    outline: 2px solid var(--rd-primary);
    outline-offset: 2px;
}

/* Remove outline on mouse click */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   LOGIN PAGE REDESIGN
   ============================================ */

/* --- Login Variables --- */
.login-redesign {
    --login-green: #1B4332;
    --login-green-mid: #2D6A4F;
    --login-green-light: #40916C;
    --login-green-accent: #52B788;
    --login-green-glow: #74C69D;
    --login-cream: #FEFAE0;
    --login-form-bg: #FFFFFF;
    --login-text: #1A1D1F;
    --login-text-light: #6F767E;
    --login-text-muted: #9A9FA5;
    --login-border: #E8E8E8;
    --login-input-bg: #F8F9FA;
    --login-input-focus: #E8F1FF;
    --login-radius: 20px;
    --login-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --login-font-display: 'Playfair Display', Georgia, serif;
}

/* --- Main Container --- */
.login-redesign {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: var(--login-font);
    animation: loginFadeUp 0.6s ease-out both;
}

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

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

/* --- Card Shell --- */
.login-card {
    display: flex;
    border-radius: var(--login-radius);
    overflow: hidden;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    min-height: 560px;
    background: var(--login-form-bg);
}

/* =====================
   BRAND PANEL (left)
   ===================== */
.login-brand-panel {
    position: relative;
    width: 420px;
    min-width: 420px;
    background: linear-gradient(160deg, var(--login-green) 0%, var(--login-green-mid) 50%, var(--login-green-light) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 40px;
}

/* Geometric pattern overlay */
.login-brand-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        radial-gradient(circle at 20% 80%, #fff 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, #fff 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, #fff 0.5px, transparent 0.5px);
    background-size: 60px 60px, 40px 40px, 20px 20px;
    pointer-events: none;
}

.login-brand-pattern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(116, 198, 157, 0.15) 0%, transparent 70%);
}

.login-brand-pattern::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 250, 224, 0.08) 0%, transparent 70%);
}

.login-brand-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo */
.login-brand-logo {
    margin-bottom: 36px;
}

.login-brand-logo img {
    max-height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Heading */
.login-brand-text h2 {
    font-family: var(--login-font-display);
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.login-brand-text p {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 280px;
}

/* Feature list */
.login-brand-features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0.85;
}

.login-brand-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Footer */
.login-brand-footer {
    position: relative;
    z-index: 1;
    opacity: 0.45;
    font-size: 0.78rem;
    margin-top: 24px;
}

/* =====================
   FORM PANEL (right)
   ===================== */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--login-form-bg);
}

.login-form-inner {
    width: 100%;
    max-width: 380px;
}

/* Mobile logo (hidden on desktop) */
.login-mobile-logo {
    display: none;
    margin-bottom: 28px;
}

.login-mobile-logo img {
    max-height: 36px;
    width: auto;
}

/* Form Header */
.login-form-header {
    margin-bottom: 32px;
}

.login-form-header h3 {
    font-family: var(--login-font);
    font-weight: 700;
    font-size: 1.55rem;
    color: var(--login-text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-form-header p {
    font-size: 0.9rem;
    color: var(--login-text-light);
    margin-bottom: 0;
}

/* Form fields */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field {
    animation: loginSlideIn 0.5s ease-out both;
}

.login-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--login-text);
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

.login-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.login-field-header label {
    margin-bottom: 0;
}

.login-forgot {
    font-size: 0.8rem;
    color: var(--login-green-light);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-forgot:hover {
    color: var(--login-green);
    text-decoration: none;
}

/* Input wrapper */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    color: var(--login-text-muted);
    font-size: 0.9rem;
    z-index: 1;
    pointer-events: none;
    transition: color 0.2s ease;
}

.login-input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1.5px solid var(--login-border);
    border-radius: 12px;
    background: var(--login-input-bg);
    font-family: var(--login-font);
    font-size: 0.92rem;
    color: var(--login-text);
    transition: all 0.25s ease;
    outline: none;
}

.login-input-wrap input::placeholder {
    color: var(--login-text-muted);
}

.login-input-wrap input:focus {
    border-color: var(--login-green-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
}

.login-input-wrap input:focus ~ .login-input-icon,
.login-input-wrap input:focus + .login-input-icon {
    color: var(--login-green-light);
}

/* When input is focused, color the icon */
.login-input-wrap:focus-within .login-input-icon {
    color: var(--login-green-light);
}

/* Toggle password button */
.login-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--login-text-muted);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    z-index: 1;
}

.login-toggle-pw:hover {
    color: var(--login-text);
}

/* Custom checkbox */
.login-remember {
    animation: loginSlideIn 0.5s ease-out both;
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--login-text-light);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.login-checkbox input {
    display: none;
}

.login-checkbox-mark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--login-border);
    background: var(--login-input-bg);
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.login-checkbox input:checked + .login-checkbox-mark {
    background: var(--login-green-light);
    border-color: var(--login-green-light);
}

.login-checkbox input:checked + .login-checkbox-mark::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Submit button */
.login-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--login-green) 0%, var(--login-green-mid) 100%);
    color: #fff;
    font-family: var(--login-font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: loginSlideIn 0.5s ease-out both;
}

.login-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--login-green-mid) 0%, var(--login-green-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-submit:hover::before {
    opacity: 1;
}

.login-submit span,
.login-submit i {
    position: relative;
    z-index: 1;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.3);
}

.login-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(27, 67, 50, 0.2);
}

.login-submit i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.login-submit:hover i {
    transform: translateX(3px);
}

/* Override OAuth buttons inside login */
.login-form-panel .login-with {
    margin-top: 24px;
    animation: loginSlideIn 0.5s ease-out both;
}

.login-form-panel .login-with-divider::before {
    background-color: var(--login-border);
}

.login-form-panel .login-with-divider span {
    font-size: 0.82rem;
    color: var(--login-text-muted);
    font-weight: 500;
}

/* Register link */
.login-register-link {
    text-align: center;
    margin-top: 28px;
    font-size: 0.88rem;
    color: var(--login-text-light);
    animation: loginSlideIn 0.5s ease-out both;
}

.login-register-link a {
    color: var(--login-green-light);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-register-link a:hover {
    color: var(--login-green);
}

/* Override captcha styling inside login */
.login-form .mb-3:last-of-type {
    margin-bottom: 0 !important;
}

/* Override .sign styles when inside login-redesign */
.login-redesign .sign {
    max-width: none;
    width: auto;
}

/* =====================
   RESPONSIVE: TABLET
   ===================== */
@media (max-width: 900px) {
    .login-brand-panel {
        width: 340px;
        min-width: 340px;
        padding: 32px;
    }

    .login-brand-text h2 {
        font-size: 1.75rem;
    }

    .login-form-panel {
        padding: 32px;
    }
}

/* =====================
   RESPONSIVE: MOBILE
   ===================== */
@media (max-width: 700px) {
    .login-redesign {
        padding: 0;
    }

    .login-card {
        flex-direction: column;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    /* Hide the large brand panel */
    .login-brand-panel {
        display: none;
    }

    /* Show mobile logo */
    .login-mobile-logo {
        display: block;
        text-align: center;
    }

    .login-form-panel {
        padding: 24px 20px 40px;
        background: transparent;
    }

    .login-form-inner {
        max-width: 100%;
    }

    .login-form-header {
        text-align: center;
        margin-bottom: 28px;
    }

    .login-form-header h3 {
        font-size: 1.4rem;
    }

    /* Mobile: add a branded top strip */
    .login-card::before {
        content: '';
        display: block;
        height: 6px;
        background: linear-gradient(90deg, var(--login-green) 0%, var(--login-green-light) 50%, var(--login-green-accent) 100%);
    }
}

/* =====================
   RESPONSIVE: SMALL MOBILE
   ===================== */
@media (max-width: 400px) {
    .login-form-panel {
        padding: 20px 16px 32px;
    }

    .login-input-wrap input {
        height: 46px;
        font-size: 0.9rem;
    }

    .login-submit {
        height: 48px;
    }
}

/* =====================
   HIDE DEFAULT NAVBAR/FOOTER ON LOGIN
   ===================== */
/* Navbar on login — transparent, blends with page */
body:has(.login-redesign) .nav-bar {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* Footer on login — green theme */
body:has(.login-redesign) .footer-sm {
    background: transparent;
    border-top: none;
}

body:has(.login-redesign) .footer-sm .footer-links .link a {
    color: var(--login-green-light, #40916C);
}

body:has(.login-redesign) .footer-sm .footer-links .link a:hover {
    color: var(--login-green, #1B4332);
}

/* Dark mode support (if body has dark class) */
body.dark .login-redesign {
    --login-form-bg: #1A1D1F;
    --login-text: #F4F4F4;
    --login-text-light: #A0A4A8;
    --login-text-muted: #6F767E;
    --login-border: #2A2D30;
    --login-input-bg: #232628;
}

body.dark .login-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================
   USER PAGE HEADER
   ============================================ */
.user-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #EFEFEF;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.user-page-header-left {
    min-width: 0;
}

.user-page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.user-page-breadcrumb a {
    color: #9A9FA5;
    text-decoration: none;
    transition: color 0.2s;
}

.user-page-breadcrumb a:hover {
    color: #2D6A4F;
}

.user-page-breadcrumb-sep {
    color: #D1D5DB;
    font-size: 0.75rem;
}

.user-page-breadcrumb-current {
    color: #6F767E;
    font-weight: 500;
}

.user-page-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #1A1D1F;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (max-width: 700px) {
    .user-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .dash-contain .user-page-header {
        margin-top: 4px;
    }

    .user-page-header-right {
        justify-content: flex-start;
    }

    .user-page-title {
        font-size: 1.25rem;
    }
}

/* ============================================
   USER TICKETS PAGE REDESIGN
   ============================================ */

.ut-page {
    --ut-green: #1B4332;
    --ut-green-mid: #2D6A4F;
    --ut-green-light: #40916C;
    --ut-green-accent: #52B788;
    --ut-green-pale: #D8F3DC;
    --ut-teal: #2D6A4F;
    --ut-teal-pale: #E0F2E9;
    --ut-sage: #52B788;
    --ut-sage-pale: #EAF7F0;
    --ut-muted: #6F767E;
    --ut-muted-pale: #F0F0F0;
    --ut-text: #1A1D1F;
    --ut-text-mid: #6F767E;
    --ut-text-muted: #9A9FA5;
    --ut-border: #E8E8E8;
    --ut-bg: #FFFFFF;
    --ut-radius: 12px;
    --ut-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-family: var(--ut-font);
    animation: utFadeIn 0.4s ease-out both;
}

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

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

/* =====================
   STAT CARDS
   ===================== */
.ut-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.ut-stat {
    background: var(--ut-bg);
    border-radius: var(--ut-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
    cursor: default;
    animation: utSlideUp 0.4s ease-out both;
}

.ut-stat:nth-child(1) { animation-delay: 0s; }
.ut-stat:nth-child(2) { animation-delay: 0.05s; }
.ut-stat:nth-child(3) { animation-delay: 0.1s; }
.ut-stat:nth-child(4) { animation-delay: 0.15s; }

.ut-stat:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.ut-stat--opened  { border-left-color: var(--ut-green-accent); }
.ut-stat--progress { border-left-color: var(--ut-teal); }
.ut-stat--waiting  { border-left-color: var(--ut-sage); }
.ut-stat--closed   { border-left-color: var(--ut-muted); }

.ut-stat--active {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.ut-stat--active.ut-stat--opened  { background: var(--ut-green-pale); }
.ut-stat--active.ut-stat--progress { background: var(--ut-teal-pale); }
.ut-stat--active.ut-stat--waiting  { background: var(--ut-sage-pale); }
.ut-stat--active.ut-stat--closed   { background: var(--ut-muted-pale); }

.ut-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ut-stat--opened .ut-stat-icon  { background: var(--ut-green-pale); color: var(--ut-green-accent); }
.ut-stat--progress .ut-stat-icon { background: var(--ut-teal-pale); color: var(--ut-teal); }
.ut-stat--waiting .ut-stat-icon  { background: var(--ut-sage-pale); color: var(--ut-sage); }
.ut-stat--closed .ut-stat-icon   { background: var(--ut-muted-pale); color: var(--ut-muted); }

.ut-stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ut-stat-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ut-text);
    line-height: 1.2;
}

.ut-stat-label {
    font-size: 0.8rem;
    color: var(--ut-text-mid);
    font-weight: 500;
    white-space: nowrap;
}

/* Override yellow primary_color on user pages */
body:has(.ut-page) {
    --primary_color: #2D6A4F;
}

body:has(.ut-page) .btn-primary {
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%) !important;
    border-color: #2D6A4F !important;
}

body:has(.ut-page) .btn-primary:hover,
body:has(.ut-page) .btn-primary:focus {
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.3) !important;
}

/* =====================
   TOOLBAR
   ===================== */
.ut-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    animation: utSlideUp 0.4s ease-out 0.15s both;
}

.ut-toolbar-title {
    font-family: var(--ut-font);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ut-text);
    margin: 0;
}

.ut-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search */
.ut-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ut-search-icon {
    position: absolute;
    left: 12px;
    color: var(--ut-text-muted);
    font-size: 0.82rem;
    pointer-events: none;
    z-index: 1;
}

.ut-search-input {
    width: 240px;
    height: 40px;
    padding: 0 36px 0 36px;
    border: 1.5px solid var(--ut-border);
    border-radius: 10px;
    background: var(--ut-bg);
    font-family: var(--ut-font);
    font-size: 0.88rem;
    color: var(--ut-text);
    outline: none;
    transition: all 0.2s ease;
}

.ut-search-input::placeholder {
    color: var(--ut-text-muted);
}

.ut-search-input:focus {
    border-color: var(--ut-green-light);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
}

.ut-search-clear {
    position: absolute;
    right: 10px;
    color: var(--ut-text-muted);
    font-size: 0.8rem;
    transition: color 0.2s;
}

.ut-search-clear:hover {
    color: var(--ut-green);
    text-decoration: none;
}

/* Buttons */
.ut-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-family: var(--ut-font);
    font-size: 0.86rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.ut-btn--outline {
    background: #fff !important;
    border: 1.5px solid #D1D5DB !important;
    color: #6F767E !important;
}

.ut-btn--outline:hover {
    border-color: #40916C !important;
    color: #40916C !important;
    text-decoration: none;
}

.ut-btn--primary {
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%) !important;
    color: #fff !important;
    border: none;
}

.ut-btn--primary:hover {
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.25);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none;
}

.ut-btn--danger {
    background: #FFECEE;
    color: #DC3545;
    border: 1.5px solid transparent;
}

.ut-btn--danger:hover {
    background: #DC3545;
    color: #fff !important;
    text-decoration: none;
}

.ut-filter-badge {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ut-green-accent);
    position: absolute;
    top: 8px;
    right: 8px;
}

/* =====================
   TABLE (Desktop)
   ===================== */
.ut-table-wrap {
    background: var(--ut-bg);
    border-radius: var(--ut-radius);
    overflow: hidden;
    animation: utSlideUp 0.4s ease-out 0.2s both;
}

.ut-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ut-font);
}

.ut-table thead th {
    padding: 14px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ut-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--ut-border);
    background: #FAFBFC;
}

.ut-table tbody td {
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--ut-text);
    border-bottom: 1px solid #F4F4F4;
    vertical-align: middle;
}

.ut-table-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.ut-table-row:hover {
    background: #F8FAF9;
}

.ut-table-row:last-child td {
    border-bottom: none;
}

.ut-table-id {
    font-weight: 700;
    color: var(--ut-green-light);
    font-size: 0.88rem;
}

.ut-table-subject {
    font-weight: 500;
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ut-table-date {
    color: var(--ut-text-mid);
    font-size: 0.85rem;
}

.ut-table-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ut-text-muted);
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.ut-table-action:hover {
    background: var(--ut-green-pale);
    color: var(--ut-green-light);
    text-decoration: none;
}

/* Status badges */
.ut-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ut-badge--opened {
    background: #D8F3DC;
    color: #1B4332;
}

.ut-badge--progress {
    background: #E0F2E9;
    color: #2D6A4F;
}

.ut-badge--waiting {
    background: #EAF7F0;
    color: #2D6A4F;
}

.ut-badge--closed {
    background: #F0F0F0;
    color: #6F767E;
}

/* Priority */
.ut-priority {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ut-text-mid);
}

/* Empty state */
.ut-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ut-text-muted);
}

.ut-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.ut-empty p {
    font-size: 0.92rem;
    margin: 0;
}

/* =====================
   MOBILE CARDS
   ===================== */
.ut-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: utSlideUp 0.4s ease-out 0.2s both;
}

.ut-card {
    display: block;
    background: var(--ut-bg);
    border-radius: var(--ut-radius);
    padding: 16px;
    text-decoration: none;
    color: var(--ut-text);
    transition: all 0.2s ease;
    border-left: 3px solid var(--ut-border);
}

.ut-card:hover {
    text-decoration: none;
    color: var(--ut-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateX(2px);
}

.ut-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ut-card-id {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--ut-green-light);
}

.ut-card-subject {
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--ut-text);
}

.ut-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ut-card-date {
    font-size: 0.78rem;
    color: var(--ut-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ut-card-priority {
    font-size: 0.78rem;
    color: var(--ut-text-mid);
    font-weight: 500;
}

/* =====================
   PAGINATION
   ===================== */
.ut-pagination {
    margin-top: 24px;
    animation: utSlideUp 0.4s ease-out 0.25s both;
}

.ut-pagination .pagination {
    justify-content: center;
    gap: 4px;
}

.ut-pagination .page-link {
    border-radius: 8px !important;
    border: 1.5px solid #E8E8E8;
    color: #6F767E;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.ut-pagination .page-link:hover {
    border-color: #40916C;
    color: #40916C;
    background: #D8F3DC;
}

.ut-pagination .page-item.active .page-link {
    background: #40916C;
    border-color: #40916C;
    color: #fff;
}

.ut-pagination .page-item.disabled .page-link {
    opacity: 0.4;
}

/* =====================
   FILTER MODAL
   ===================== */
.modal-content.ut-modal {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
}

.ut-modal .ut-modal-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 28px 28px 0 !important;
    border: none !important;
    margin: 0 !important;
    background: transparent !important;
}

.ut-modal .ut-modal-header h5 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    color: #1A1D1F !important;
    margin: 0 !important;
}

.ut-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: #F4F4F4;
    color: #6F767E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.ut-modal-close:hover {
    background: #D8F3DC;
    color: #1B4332;
}

.ut-modal .ut-modal-body {
    padding: 24px 28px !important;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.ut-modal .ut-modal-footer {
    padding: 0 28px 28px !important;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border: none !important;
    margin: 0 !important;
}

.ut-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ut-form-label {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #1A1D1F !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0 !important;
}

/* Modal search input */
.ut-modal .ut-search-wrap--modal {
    width: 100%;
}

.ut-modal .ut-search-wrap--modal .ut-search-input {
    width: 100%;
    height: 46px;
    background: #F8F9FA;
    border: 1.5px solid #E8E8E8;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1A1D1F;
    padding-left: 40px;
}

.ut-modal .ut-search-wrap--modal .ut-search-input:focus {
    border-color: #40916C;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
    background: #fff;
}

/* Modal checkboxes */
.ut-check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ut-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1A1D1F;
    margin: 0;
    user-select: none;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #E8E8E8;
    background: #FAFBFC;
    transition: all 0.2s ease;
}

.ut-check:hover {
    border-color: #D8F3DC;
    background: #F8FAF9;
}

.ut-check input {
    display: none;
}

.ut-check-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid #D1D5DB;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.ut-check input:checked + .ut-check-box {
    background: #40916C;
    border-color: #40916C;
}

.ut-check input:checked + .ut-check-box::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ut-check:has(input:checked) {
    border-color: #40916C;
    background: #EAF7F0;
}

.ut-check-label {
    font-weight: 500;
}

/* Modal buttons override */
.ut-modal .ut-btn {
    height: 44px;
    padding: 0 20px;
    font-size: 0.9rem;
}

.ut-modal .ut-btn--outline {
    background: #F4F4F4;
    border: 1.5px solid #E8E8E8;
    color: #6F767E;
}

.ut-modal .ut-btn--outline:hover {
    background: #EFEFEF;
    color: #1A1D1F;
}

.ut-modal .ut-btn--primary {
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    color: #fff;
    border: none;
}

.ut-modal .ut-btn--primary:hover {
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.3);
}

@media (max-width: 500px) {
    .ut-check-grid {
        grid-template-columns: 1fr;
    }
}


/* =====================
   RESPONSIVE: TABLET
   ===================== */
@media (max-width: 1024px) {
    .ut-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ut-search-input {
        width: 200px;
    }
}

/* =====================
   RESPONSIVE: MOBILE
   ===================== */
@media (max-width: 700px) {
    .ut-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ut-stat {
        padding: 14px;
        gap: 12px;
    }

    .ut-stat-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .ut-stat-count {
        font-size: 1.2rem;
    }

    .ut-stat-label {
        font-size: 0.75rem;
    }

    .ut-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ut-toolbar-right {
        flex-wrap: wrap;
    }

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

    .ut-search-input {
        width: 100%;
    }

    .at-toolbar-actions .ut-btn span {
        display: none;
    }

    .at-toolbar-actions .ut-btn {
        padding: 0 12px;
    }

    .ut-check-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .ut-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ut-stat {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ============================================
   CREATE TICKET FORM
   ============================================ */
.ut-create-card {
    background: #fff;
    border-radius: 14px;
    padding: 32px;
    animation: utSlideUp 0.4s ease-out both;
}

.ut-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 28px;
}

.ut-create-field--full {
    grid-column: 1 / -1;
}

.ut-create-label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1A1D1F;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.ut-create-label-hint {
    font-weight: 400;
    color: #9A9FA5;
    font-size: 0.78rem;
}

/* Text input */
.ut-create-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid #E8E8E8;
    border-radius: 10px;
    background: #F8F9FA;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #1A1D1F;
    outline: none;
    transition: all 0.2s ease;
}

.ut-create-input::placeholder {
    color: #9A9FA5;
}

.ut-create-input:focus {
    border-color: #40916C;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
}

/* Select */
.ut-create-select-wrap {
    position: relative;
}

.ut-create-select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1.5px solid #E8E8E8;
    border-radius: 10px;
    background: #F8F9FA;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #1A1D1F;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ut-create-select:focus {
    border-color: #40916C;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
}

.ut-create-select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9A9FA5;
    font-size: 0.75rem;
    pointer-events: none;
}

/* Textarea */
.ut-create-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #E8E8E8;
    border-radius: 10px;
    background: #F8F9FA;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #1A1D1F;
    outline: none;
    resize: vertical;
    min-height: 160px;
    line-height: 1.6;
    transition: all 0.2s ease;
}

.ut-create-textarea::placeholder {
    color: #9A9FA5;
}

.ut-create-textarea:focus {
    border-color: #40916C;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
}

/* Attachments */
.ut-attachments {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ut-attachment-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ut-attachment-input-wrap {
    flex: 1;
    position: relative;
}

.ut-attachment-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9A9FA5;
    font-size: 0.85rem;
    pointer-events: none;
}

.ut-attachment-input {
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 38px;
    border: 1.5px dashed #D1D5DB;
    border-radius: 10px;
    background: #FAFBFC;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    color: #6F767E;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ut-attachment-input:hover {
    border-color: #40916C;
    background: #F8FAF9;
}

.ut-attachment-input:focus {
    border-color: #40916C;
    border-style: solid;
}

.ut-attachment-input::file-selector-button {
    display: none;
}

.ut-attachment-add {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1.5px solid #E8E8E8;
    background: #fff;
    color: #6F767E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ut-attachment-add:hover {
    border-color: #40916C;
    color: #40916C;
    background: #EAF7F0;
}

/* Actions */
.ut-create-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid #EFEFEF;
}

/* Responsive */
@media (max-width: 700px) {
    .ut-create-card {
        padding: 20px;
        border-radius: 12px;
    }

    .ut-create-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ut-create-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .ut-create-actions .ut-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   DYNAMIC QUESTIONS AREA
   ============================================ */
.ut-questions-area {
    margin-top: 22px;
    padding: 24px;
    background: #F8FAF9;
    border: 1.5px solid #D8F3DC;
    border-radius: 12px;
}

.ut-questions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2D6A4F;
}

.ut-questions-header i {
    font-size: 1rem;
    color: #40916C;
}

.ut-questions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ut-questions-grid .ut-create-field--full {
    grid-column: 1 / -1;
}

@media (max-width: 700px) {
    .ut-questions-area {
        padding: 18px;
    }

    .ut-questions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TICKET SHOW PAGE
   ============================================ */
.ut-show {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    animation: utFadeIn 0.4s ease-out both;
}

/* --- Conversation --- */
.ut-conversation {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ut-message {
    display: flex;
    gap: 14px;
    animation: utSlideUp 0.3s ease-out both;
}

.ut-message-avatar {
    flex-shrink: 0;
}

.ut-message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E8E8E8;
}

.ut-message--support .ut-message-avatar img {
    border-color: #D8F3DC;
}

.ut-message-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #F0F0F0;
}

.ut-message--support .ut-message-content {
    background: #F8FAF9;
    border-color: #E0F2E9;
}

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

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

.ut-message-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1A1D1F;
}

.ut-message-role {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #D8F3DC;
    color: #1B4332;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ut-message-time {
    font-size: 0.78rem;
    color: #9A9FA5;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.ut-message-subject {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1A1D1F;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.ut-message-body {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #3A3F44;
    word-break: break-word;
}

.ut-message-body strong {
    color: #1A1D1F;
    font-weight: 600;
}

/* Attachments in messages */
.ut-message-attachments {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ut-attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #F4F4F4;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #6F767E;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.ut-attachment-file:hover {
    background: #EAF7F0;
    border-color: #D8F3DC;
    color: #2D6A4F;
    text-decoration: none;
}

.ut-attachment-dl {
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.ut-attachment-file:hover .ut-attachment-dl {
    opacity: 1;
}

/* --- Reply Card --- */
.ut-reply-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #F0F0F0;
    margin-top: 8px;
    overflow: hidden;
}

.ut-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid #F0F0F0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    color: #1A1D1F;
}

.ut-reply-header i {
    color: #40916C;
}

.ut-reply-textarea {
    width: 100%;
    border: none;
    padding: 16px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #1A1D1F;
    resize: vertical;
    min-height: 100px;
    outline: none;
    line-height: 1.6;
}

.ut-reply-textarea::placeholder {
    color: #9A9FA5;
}

.ut-reply-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #F0F0F0;
    background: #FAFBFC;
}

.ut-reply-attachments {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ut-reply-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    background: #fff;
    color: #6F767E;
    font-size: 0.82rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.ut-reply-attach-btn:hover {
    border-color: #40916C;
    color: #40916C;
}

/* --- Sidebar --- */
.ut-detail-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #F0F0F0;
    position: sticky;
    top: 100px;
}

.ut-detail-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #F0F0F0;
}

.ut-detail-id {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #40916C;
}

/* Detail list */
.ut-detail-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ut-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ut-detail-label {
    font-size: 0.76rem;
    font-weight: 500;
    color: #9A9FA5;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ut-detail-label i {
    font-size: 0.7rem;
    width: 14px;
    text-align: center;
}

.ut-detail-value {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1A1D1F;
    padding-left: 20px;
}

/* Purchase section in sidebar */
.ut-detail-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #F0F0F0;
}

.ut-detail-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1A1D1F;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ut-detail-section-title i {
    color: #40916C;
    font-size: 0.78rem;
}

.ut-purchase-item {
    padding: 12px;
    background: #FAFBFC;
    border-radius: 10px;
    margin-bottom: 8px;
}

.ut-purchase-item:last-child {
    margin-bottom: 0;
}

.ut-purchase-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.ut-purchase-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1A1D1F;
    line-height: 1.3;
}

.ut-purchase-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: #6F767E;
}

.ut-purchase-signatures {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.ut-sig {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ut-sig--ok {
    background: #D8F3DC;
    color: #1B4332;
}

.ut-sig--pending {
    background: #FFF4E0;
    color: #B06C00;
}

/* =====================
   TICKET SHOW RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .ut-show {
        grid-template-columns: 1fr;
    }

    .ut-detail-card {
        position: static;
    }

    .ut-show-sidebar {
        order: -1;
    }
}

@media (max-width: 700px) {
    .ut-message {
        flex-direction: column;
        gap: 0;
    }

    .ut-message-avatar {
        margin-bottom: -10px;
        margin-left: 10px;
        z-index: 1;
    }

    .ut-message-avatar img {
        width: 32px;
        height: 32px;
    }

    .ut-message-content {
        padding: 16px;
    }

    .ut-message-subject {
        font-size: 1rem;
    }

    .ut-reply-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .ut-reply-footer .ut-btn {
        justify-content: center;
    }

    .ut-detail-card {
        padding: 18px;
    }

    .ut-detail-status {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ============================================
   GPS BLOCKER OVERLAY
   ============================================ */
.gps-blocker {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(27, 67, 50, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gps-blocker-content {
    text-align: center;
    max-width: 380px;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
}

.gps-blocker-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    animation: gpsBlockerPulse 2s ease-in-out infinite;
}

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

.gps-blocker-content h3 {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.gps-blocker-content p {
    font-size: 0.92rem;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 28px;
}

.gps-blocker-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    background: #fff;
    color: #1B4332;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gps-blocker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.gps-blocker-btn:disabled {
    opacity: 0.7;
    transform: none;
}

.gps-blocker-hint {
    display: block;
    margin-top: 16px;
    font-size: 0.78rem;
    opacity: 0.5;
}

/* ============================================
   AGENT TICKETS PAGE REDESIGN
   ============================================ */

/* --- Agent status counters (mobile-first) --- */
.at-counters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.at-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    border: 1.5px solid #F0F0F0;
    transition: all 0.2s ease;
    text-align: center;
}

.at-counter:hover {
    text-decoration: none;
    border-color: #D8F3DC;
    transform: translateY(-1px);
}

.at-counter--active {
    border-color: #40916C;
    background: #EAF7F0;
}

.at-counter-num {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #1A1D1F;
    line-height: 1;
}

.at-counter-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: #6F767E;
    margin-top: 4px;
    white-space: nowrap;
}

/* --- Quick filter pills --- */
.at-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.at-pills::-webkit-scrollbar { display: none; }

.at-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid #E8E8E8;
    background: #fff;
    color: #6F767E;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.at-pill:hover {
    text-decoration: none;
    border-color: #40916C;
    color: #2D6A4F;
}

.at-pill--active {
    background: #1B4332 !important;
    border-color: #1B4332 !important;
    color: #fff !important;
}

/* --- Toolbar --- */
.at-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.at-toolbar-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #1A1D1F;
    margin: 0;
}

.at-toolbar-actions {
    display: flex;
    gap: 8px;
}

/* --- Mobile ticket cards (primary view) --- */
.at-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.at-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1A1D1F;
    border: 1px solid #F0F0F0;
    transition: all 0.15s ease;
}

.at-card:hover {
    text-decoration: none;
    color: #1A1D1F;
    border-color: #D8F3DC;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.at-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.at-card-id {
    font-weight: 700;
    font-size: 0.82rem;
    color: #40916C;
}

.at-card-subject {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.at-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.at-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    color: #9A9FA5;
}

.at-card-info i {
    font-size: 0.7rem;
}

.at-card-agent {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #6F767E;
}

.at-card-agent img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- Desktop table --- */
.at-table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #F0F0F0;
}

.at-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Sans', sans-serif;
}

.at-table thead th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9A9FA5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #F0F0F0;
    background: #FAFBFC;
}

.at-table tbody td {
    padding: 14px 16px;
    font-size: 0.88rem;
    color: #1A1D1F;
    border-bottom: 1px solid #F8F8F8;
    vertical-align: middle;
}

.at-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.at-table tbody tr:hover {
    background: #F8FAF9;
}

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

.at-table-id {
    font-weight: 700;
    color: #40916C;
    font-size: 0.85rem;
}

.at-table-subject {
    font-weight: 500;
    max-width: 300px;
}

.at-table-agent {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #9A9FA5;
}

.at-table-agent img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.at-table-date {
    color: #6F767E;
    font-size: 0.82rem;
}

.at-table-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9A9FA5;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.at-table-action:hover {
    background: #EAF7F0;
    color: #40916C;
    text-decoration: none;
}

/* --- Empty state --- */
.at-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9A9FA5;
    font-family: 'DM Sans', sans-serif;
}

.at-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.35;
}

/* --- Responsive --- */
@media (max-width: 700px) {
    .at-counters {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .at-counter {
        padding: 10px 4px;
    }

    .at-counter-num {
        font-size: 1.1rem;
    }

    .at-counter-label {
        font-size: 0.64rem;
    }

    .at-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 400px) {
    .at-counters {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   SHARED DETAIL CARD STYLES (bvs-*)
   ============================================ */
.bvs-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #F0F0F0;
    margin-bottom: 16px;
    font-family: 'DM Sans', -apple-system, sans-serif;
}

.bvs-card-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.88rem !important;
    color: #1A1D1F !important;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D8F3DC;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bvs-card-title i {
    color: #40916C;
    font-size: 0.85rem;
}

.bvs-info-label {
    font-size: 0.72rem !important;
    color: #9A9FA5 !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.bvs-info-value {
    font-size: 0.88rem !important;
    color: #1A1D1F !important;
    font-weight: 500;
    word-break: break-word;
}

.bvs-info-item {
    margin-bottom: 10px;
}

.bvs-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 700px) {
    .bvs-info-row {
        grid-template-columns: 1fr;
    }
    .bvs-card {
        padding: 14px;
    }
}
