@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #f3f6f9;
    --bg-card: #ffffff;
    --border-color: rgba(226, 232, 240, 0.8);
    --text-title: #1e293b;
    --text-body: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Tocly Teal Primary Accent */
    --primary: #176b77;
    --primary-light: #eff7f8;
    --primary-glow: rgba(23, 107, 119, 0.12);
    --primary-gradient: linear-gradient(135deg, #176b77 0%, #0e4e57 100%);
    --primary-rgb: 23, 107, 119;

    --success: #22c55e;
    --success-light: #f0fdf4;
    --warning: #eab308;
    --warning-light: #fef9c3;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #06b6d4;
    --info-light: #ecfeff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.01);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.04), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Guard-based color overrides that blend into the Tocly design framework */
.theme-consulate {
    --primary: #059669;
    --primary-light: #ecfdf5;
    --primary-glow: rgba(5, 150, 105, 0.12);
    --primary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    --primary-rgb: 5, 150, 105;
}

.theme-user {
    --primary: #176b77;
    /* Beautiful Tocly Teal */
    --primary-light: #eff7f8;
    --primary-glow: rgba(23, 107, 119, 0.12);
    --primary-gradient: linear-gradient(135deg, #176b77 0%, #0e4e57 100%);
    --primary-rgb: 23, 107, 119;
}

.theme-staff {
    --primary: #134e5a;
    /* Consulate Dark Teal matching sidebar */
    --primary-light: #eff7f9;
    --primary-glow: rgba(19, 78, 90, 0.12);
    --primary-gradient: linear-gradient(135deg, #134e5a 0%, #0c353e 100%);
    --primary-rgb: 19, 78, 90;
}

.theme-officer {
    --primary: #134e5a;
    /* Tocly Dark Teal matching sidebar */
    --primary-light: #eff7f9;
    --primary-glow: rgba(19, 78, 90, 0.12);
    --primary-gradient: linear-gradient(135deg, #134e5a 0%, #0c353e 100%);
    --primary-rgb: 19, 78, 90;
}

.theme-admin {
    --primary: #134e5a;
    /* Consulate Dark Teal matching sidebar */
    --primary-light: #eff7f9;
    --primary-glow: rgba(19, 78, 90, 0.12);
    --primary-gradient: linear-gradient(135deg, #134e5a 0%, #0c353e 100%);
    --primary-rgb: 19, 78, 90;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-title);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--text-title);
}

/* ==========================================================================
   Auth Pages Layout (Glassmorphism & Tocly Dark Teal Backdrop Options)
   ========================================================================== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(circle at 50% 50%, #176b77 0%, #104a55 100%);
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: #ffffff;
    border: none;
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

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

.auth-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-title);
}

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

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-title);
    font-size: 13.5px;
    transition: var(--transition-base);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.btn-submit {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    padding: 11px 20px;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(23, 107, 119, 0.15);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(var(--primary-rgb), 0.2);
    filter: brightness(1.05);
}

.btn-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition-base);
}

.auth-link:hover {
    text-decoration: underline;
}

.portal-switch {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.portal-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-body);
    transition: var(--transition-base);
    cursor: pointer;
}

.portal-badge:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.portal-badge.active-user {
    border: 1px solid rgba(23, 107, 119, 0.2);
    background: #eff7f8;
    color: #176b77;
}

.portal-badge.active-staff {
    border: 1px solid rgba(2, 132, 199, 0.2);
    background: #f0f9ff;
    color: #0284c7;
}

.portal-badge.active-officer {
    border: 1px solid rgba(19, 78, 90, 0.2);
    background: #eff7f9;
    color: #134e5a;
}

.portal-badge.active-admin {
    border: 1px solid rgba(17, 94, 89, 0.2);
    background: #f0fdfa;
    color: #115e59;
}

.alert {
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
}

.alert-success {
    background: var(--success-light);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: var(--success);
}


/* ==========================================================================
   Tocly Dark Teal Sidebar Layout
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling - Solid Tocly Dark Teal */
.app-sidebar {
    width: 250px;
    background: #134e5a;
    /* Tocly Dark Teal */
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.sidebar-logo {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    /* White logo */
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text span {
    background: #ffffff;
    color: #134e5a;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-menu {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.menu-category {
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    /* Tocly Header text color */
    letter-spacing: 1px;
    padding: 0 24px;
    margin-bottom: 10px;
    margin-top: 20px;
    text-transform: uppercase;
}

.menu-category:first-child {
    margin-top: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #add3db;
    /* Tocly soft cyan text */
    font-weight: 500;
    gap: 12px;
    font-size: 13.5px;
    transition: var(--transition-base);
    border-radius: 8px;
    margin: 2px 14px;
}

.menu-item svg,
.menu-item i {
    width: 18px;
    font-size: 15px;
    text-align: center;
    color: #add3db;
    transition: var(--transition-base);
}

.menu-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    /* Tocly soft hover */
}

.menu-item:hover svg,
.menu-item:hover i {
    color: #ffffff;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    /* Tocly active pill */
    color: #ffffff;
    font-weight: 600;
}

.menu-item.active svg,
.menu-item.active i {
    color: #ffffff;
}

/* App Main Content Area */
.app-content {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header Navbar Styling (Clean White Header) */
.app-header {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-body);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.menu-toggle-btn:hover {
    background: #f1f5f9;
}

.menu-toggle-btn svg {
    width: 20px;
    height: 20px;
}

.header-search {
    position: relative;
    width: 260px;
}

.header-search input {
    width: 100%;
    padding: 8px 16px 8px 36px;
    border-radius: 30px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 13px;
    outline: none;
    transition: var(--transition-base);
}

.header-search input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    width: 300px;
}

.header-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

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

.header-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-body);
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.header-icon-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
}

.user-profile-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 30px;
    transition: var(--transition-base);
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.user-profile-dropdown:hover {
    background: #f1f5f9;
    border-color: rgba(var(--primary-rgb), 0.2);
}

.profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.profile-info {
    text-align: left;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-title);
    line-height: 1.2;
}

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


/* Main Workspace Content */
.main-body {
    padding: 30px;
    flex: 1;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

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

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 4px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    gap: 6px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs span {
    color: var(--text-light);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.header-action-buttons {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-base);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary-action {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
    filter: brightness(1.05);
}

.btn-secondary-action {
    background: #ffffff;
    color: var(--text-body);
    border: 1px solid #cbd5e1;
}

.btn-secondary-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Stat Cards Grid - Tocly Soft White Styling */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.zanex-stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.zanex-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-rgb), 0.15);
}

.stat-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-title);
    line-height: 1.1;
    font-family: 'Outfit', sans-serif;
}

.stat-growth {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    margin-top: 2px;
}

.stat-growth span {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.stat-growth.growth-up span {
    background: #d1fae5;
    color: #065f46;
}

.stat-growth.growth-down span {
    background: #fee2e2;
    color: #991b1b;
}

.stat-right-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-base);
}

.zanex-stat-card:hover .stat-right-icon {
    transform: scale(1.05);
}

.icon-blue {
    background: rgba(35, 137, 151, 0.08);
    color: #176b77;
}

.icon-orange {
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
}

.icon-purple {
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
}

.icon-teal {
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
}

.icon-red {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}


/* Visual Dashboard Grid (Charts and Widgets) */
.visuals-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

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

.visual-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.visual-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-title);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Data Table Grid Card */
.table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    min-width: 0;
    overflow: hidden;
}

.table-card:hover {
    box-shadow: var(--shadow-md);
}

.table-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.table-search-row input {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    width: 220px;
    outline: none;
    transition: var(--transition-base);
}

.table-search-row input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.zanex-table th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-title);
    font-weight: 600;
    font-size: 12px;
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.zanex-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-body);
    background: #ffffff;
    transition: var(--transition-base);
}

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

.zanex-table tr:hover td {
    background: #f8fafc;
}

/* Badges for status (Pill Designs) */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-status-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-status-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-status-info {
    background: #e0f2fe;
    color: #075985;
}

/* Table Action Buttons */
.action-btns {
    display: flex;
    gap: 6px;
}

.btn-icon-action {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    font-size: 13px;
}

.btn-edit {
    background: #e0e7ff;
    color: #4f46e5;
}

.btn-edit:hover {
    background: #4f46e5;
    color: #ffffff;
}

.btn-delete {
    background: #fee2e2;
    color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: #ffffff;
}


/* ==========================================================================
   Profile Settings Grid
   ========================================================================== */
.profile-settings-grid {
    display: grid;
    grid-template-columns: 1fr 2.2fr;
    gap: 20px;
    align-items: start;
}

.profile-settings-grid>* {
    min-width: 0;
}

@media (max-width: 900px) {
    .profile-settings-grid {
        grid-template-columns: 1fr;
    }
}

.profile-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 26px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.profile-large-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    border: 4px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    font-family: 'Outfit', sans-serif;
}

.profile-user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 4px;
}

.profile-user-role {
    font-size: 11px;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    background: var(--primary-light);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
}

.profile-user-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    color: var(--text-title);
    font-weight: 600;
}

/* ==========================================================================
   Premium Chat Box Custom Overrides
   ========================================================================== */
#chatMessages {
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 107, 119, 0.2) transparent;
}

#chatMessages::-webkit-scrollbar {
    width: 4px;
}

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

#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(23, 107, 119, 0.2);
    border-radius: 2px;
}

/* Reply input enhancements */
textarea.form-input[placeholder*="Type your message"] {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    transition: var(--transition-base);
}

textarea.form-input[placeholder*="Type your message"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================
   Notification System Styles
   ========================================== */
.notification-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.notification-dropdown-panel {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    width: 340px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    z-index: 1050;
    overflow: hidden;
    animation: slideUpIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-dropdown-panel.show {
    display: block;
}

.dropdown-panel-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-title);
}

.dropdown-panel-header a {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

.dropdown-panel-body {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-base);
    text-align: left;
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item.unread {
    background-color: rgba(var(--primary-rgb), 0.02);
    border-left: 3px solid var(--primary);
}

.notification-item.read {
    border-left: 3px solid transparent;
}

.notif-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.notif-icon-circle i {
    font-size: 13px;
}

.notif-content {
    flex-grow: 1;
}

.notif-title {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-title);
    margin-bottom: 2px;
}

.notif-message {
    font-size: 11.5px;
    color: var(--text-body);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 10px;
    color: var(--text-light);
}

.notif-empty-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.dropdown-panel-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    font-size: 12px;
}

.dropdown-panel-footer a {
    color: var(--primary);
    font-weight: 700;
}

.dropdown-panel-footer a:hover {
    text-decoration: underline;
}

/* Distinct styling for notifications list page */
.notification-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
    transition: var(--transition-base);
    cursor: pointer;
    text-align: left;
}

.notification-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-rgb), 0.15);
}

.notification-card.unread {
    background: rgba(var(--primary-rgb), 0.015);
    border-left: 4px solid var(--primary);
}

.notification-card.read {
    border-left: 4px solid #cbd5e1;
}

.text-info {
    color: #0284c7 !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-success {
    color: #059669 !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Sidebar Submenu Dropdown Styling */
.menu-item-dropdown {
    display: flex;
    flex-direction: column;
}

.menu-item-dropdown-trigger {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-item-dropdown-content {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.005);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 28px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.menu-item-dropdown.open .menu-item-dropdown-content {
    display: flex;
}

.menu-item-dropdown.open .submenu-caret {
    transform: rotate(180deg);
}

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

.menu-item-dropdown-content .menu-item {
    padding-left: 14px;
    margin: 2px 14px 2px 4px;
    font-size: 13px;
    font-weight: 500;
}

/* Sleek Scrollbar for Sidebar Menu */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal styling overrides */
#editModal>div.table-card {
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: slideUpIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Detailed UI Polishing Additions
   ========================================================================== */

/* Stat Card Radial Glow Decor */
.zanex-stat-card {
    position: relative;
    overflow: hidden;
}

.zanex-stat-card::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -70px;
    right: -70px;
    opacity: 0.6;
    pointer-events: none;
    transition: var(--transition-base);
}

.zanex-stat-card:hover::before {
    transform: scale(1.3);
    opacity: 0.8;
}

/* File Upload dashed border style */
input[type="file"].form-input {
    padding: 10px;
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    cursor: pointer;
    line-height: 1;
}

input[type="file"].form-input:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* Segmented Control filters tab bar */
.table-filters {
    display: inline-flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    border: none;
    width: fit-content;
}

.table-filters .btn-action {
    margin: 0 !important;
    border: none !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    background: transparent !important;
    color: var(--text-body) !important;
    box-shadow: none !important;
    height: 32px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: var(--transition-base) !important;
}

.table-filters .btn-action:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-title) !important;
}

.table-filters .btn-action.btn-primary-action {
    background: #ffffff !important;
    color: var(--primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Premium Form Grouping and Labels */
.form-input {
    border: 1.5px solid #cbd5e1;
    padding: 11px 16px;
    border-radius: 8px;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-label {
    color: var(--text-title);
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 8px;
}

/* Chat bubble styling overrides to hide inline-style visual bugs */
#chatMessages>div>div[style*="padding: 10px 14px"] {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    border-radius: 12px !important;
}

#chatMessages>div>div[style*="flex-end"]>div[style*="padding: 10px 14px"] {
    border-bottom-right-radius: 2px !important;
}

#chatMessages>div>div[style*="flex-start"]>div[style*="padding: 10px 14px"] {
    border-bottom-left-radius: 2px !important;
}

/* Card Header left stripe accent */
.card-header {
    border-left: 4px solid var(--primary) !important;
    padding-left: 14px !important;
    margin-bottom: 24px;
    padding-bottom: 4px;
    border-bottom: none !important;
}

/* Premium Cloud File Upload Widget styles */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
    transition: var(--transition-base);
}

.file-upload-wrapper:hover .file-upload-trigger {
    background: var(--primary-light);
    border-color: var(--primary);
}

.file-upload-trigger i {
    font-size: 32px;
    color: var(--text-light);
    margin-bottom: 8px;
    transition: var(--transition-base);
}

.file-upload-wrapper:hover .file-upload-trigger i {
    color: var(--primary);
    transform: translateY(-2px);
}

.file-upload-text {
    font-weight: 600;
    color: var(--text-body);
    font-size: 13.5px;
}

.file-upload-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

/* ==========================================================================
   Mobile Responsiveness & Sidebar Drawer overrides
   ========================================================================== */
@media (max-width: 991px) {

    /* Hide sidebar by default on mobile */
    .app-sidebar {
        left: -250px !important;
        box-shadow: none;
    }

    /* Reveal sidebar when body has class .sidebar-open */
    body.sidebar-open .app-sidebar {
        left: 0 !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
    }

    /* Close cross button inside mobile logo */
    .sidebar-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.7);
        font-size: 20px;
        cursor: pointer;
        width: 32px;
        height: 32px;
        border-radius: 6px;
        transition: var(--transition-base);
    }

    .sidebar-close-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

    /* Make content take full width */
    .app-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Adjust header spacing on mobile */
    .app-header {
        padding: 0 16px !important;
    }

    /* Adjust main body spacing on mobile */
    .main-body {
        padding: 16px !important;
    }

    /* Form grids collapse to single columns */
    .profile-settings-grid,
    .noc-grid,
    .form-grid-2,
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Table cards overflow horizontally scroll */
    .table-responsive {
        overflow-x: auto !important;
        width: 100% !important;
    }

    .zanex-table {
        min-width: 750px !important;
    }

    .table-search-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .table-search-row input {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .table-filters {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        max-width: calc(100% - 32px) !important;
        gap: 6px !important;
        margin-left: 16px !important;
        margin-right: 16px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .table-filters::-webkit-scrollbar {
        display: none;
    }

    .table-filters .btn-action {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    /* Metric cards display in 2 columns on tablet, 1 column on mobile */
    .stat-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 16px !important;
    }

    /* Modal dialog scrollable overflow protection on mobile */
    #addModal,
    #editModal,
    #feedbackModal,
    #complaintModal,
    .modal,
    div[id*="Modal"] {
        overflow-y: auto !important;
        padding: 10px !important;
        align-items: flex-start !important;
    }

    #addModal>.table-card,
    #editModal>.table-card,
    #feedbackModal>.table-card,
    #complaintModal>.table-card,
    .modal>.table-card,
    div[id*="Modal"]>.table-card {
        margin: 20px auto !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Auto-collapse any inline grids with 2 columns to a single column on mobile */
    div[style*="grid-template-columns"][style*="1fr 1fr"],
    div[style*="grid-template-columns"][style*="repeat"],
    div[style*="grid-template-columns"][style*="minmax"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Table Filter Bar responsive folding */
    .table-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
    }

    .table-filter-bar input,
    .table-filter-bar select,
    .table-filter-bar button {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .card-header form {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .card-header form select,
    .card-header form input {
        flex: 1 !important;
        min-width: 110px !important;
    }

    /* Target the right-aligned filter button container inside card header on mobile */
    .card-header>div:last-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 10px !important;
        margin-top: 10px !important;
    }

    .card-header>div:last-child>* {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .card-header>div:last-child input,
    .card-header>div:last-child select,
    .card-header>div:last-child button {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .visuals-grid>* {
        min-width: 0 !important;
    }

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

    .page-header .header-action-buttons {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
}

@media (max-width: 576px) {

    /* Metric cards collapse to 1 column on mobile */
    .stat-cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* Hide some elements on mobile header for space */
    .header-search {
        display: none !important;
    }

    .user-profile-dropdown .profile-info {
        display: none !important;
        /* Hide name/role on small devices, avatar is enough */
    }

    /* Table card padding collapse */
    .table-card {
        padding: 16px !important;
    }

    /* Breadcrumbs hide for compact display */
    .breadcrumbs {
        display: none !important;
    }
}