:root {
    --bg-dark: #0b1329;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #f8fafc;
    --accent-teal: #0877ee;
    --accent-teal-hover: #0754b8;
    --accent-green: #059669;
    --accent-blue: #0877ee;
    --accent-blue-hover: #0754b8;
    --border-light: #e2e8f0;
    --border-dark: #1e293b;
    
    --stat-total: #0f172a;
    --stat-open: #f59e0b;
    --stat-breached: #ef4444;
    --stat-resolved: #10b981;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #f1f5f9;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.portal-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Enterprise White Sidebar Navigation */
.portal-sidebar {
    width: 260px;
    height: 100vh;
    position: relative;
    flex-shrink: 0;
    background-color: var(--sidebar-bg);
    color: var(--text-primary);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.95rem;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
}

.brand-header {
    margin-bottom: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.1rem 0.25rem 0.9rem 0.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    padding: 0;
    text-decoration: none;
    border: none;
    box-shadow: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand-link:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}

.brand-logo-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    display: block;
    box-sizing: border-box;
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
    padding-left: 0.45rem;
    font-weight: 700;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.85rem;
    color: #0f172a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-custom i {
    color: #0877ee;
    font-size: 1.05rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link-custom:hover {
    color: #0877ee;
    background-color: #f0f7ff;
}

.nav-link-custom:hover i {
    color: #0754b8;
    transform: scale(1.08);
}

.nav-link-custom.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0877ee 0%, #0284c7 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(8, 119, 238, 0.25);
}

.nav-link-custom.active i {
    color: #ffffff !important;
    transform: none;
}

.nav-link-custom.active:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #0754b8 0%, #0274b3 100%);
}

.nav-link-custom.active:hover i {
    color: #ffffff !important;
}

/* User Profile Footer in Sidebar */
.user-profile-card {
    margin-top: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.avatar-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0877ee 0%, #0284c7 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(8, 119, 238, 0.25);
}

.user-profile-name {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-profile-role {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.profile-action-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-right: 0.25rem;
}

.profile-action-btn:hover {
    color: #0284c7;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.profile-action-btn.logout:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Workspace Switcher Buttons */
.workspace-switch-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.2s ease;
}

.workspace-switch-btn i.bi {
    color: #0877ee;
    transition: color 0.2s ease;
}

.workspace-switch-btn.suite-btn i.bi-grid-3x3-gap-fill {
    color: #0877ee;
}

.workspace-switch-btn:hover {
    background: #f0f7ff;
    border-color: #bae6fd;
    color: #0877ee;
}

.workspace-switch-btn:hover i.bi {
    color: #0754b8;
}

.workspace-switch-btn.active {
    background: linear-gradient(135deg, #0877ee 0%, #0284c7 100%);
    color: #ffffff;
    border-color: #0877ee;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(8, 119, 238, 0.25);
}

.workspace-switch-btn.active i.bi {
    color: #ffffff;
}

.workspace-switch-btn.active:hover {
    background: linear-gradient(135deg, #0754b8 0%, #0274b3 100%);
    color: #ffffff;
}

.workspace-switch-btn.active:hover i.bi {
    color: #ffffff;
}

/* Main Content Area */
.portal-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    min-width: 0;
    padding: 2rem 2.5rem;
    box-sizing: border-box;
    background-color: #f1f5f9;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
}

.welcome-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.btn-new-ticket {
    background: linear-gradient(135deg, #0877ee 0%, #0284c7 100%);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(8, 119, 238, 0.25);
    transition: all 0.2s ease;
}

.btn-new-ticket:hover {
    background: linear-gradient(135deg, #0754b8 0%, #0274b3 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(8, 119, 238, 0.35);
}

/* KPI Overview Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.kpi-value.total { color: var(--stat-total); }
.kpi-value.open { color: var(--stat-open); }
.kpi-value.breached { color: var(--stat-breached); }
.kpi-value.resolved { color: var(--stat-resolved); }

/* Table Dashboard */
.table-card {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.table-custom td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    vertical-align: middle;
}

.ticket-no-badge {
    font-weight: 700;
    font-family: monospace;
    color: #334155;
}

.org-pill {
    background-color: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.priority-badge-critical { color: #dc2626; font-weight: 800; }
.priority-badge-high { color: #ea580c; font-weight: 700; }
.priority-badge-medium { color: #2563eb; font-weight: 600; }
.priority-badge-low { color: #64748b; font-weight: 500; }

.status-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-pill.in-progress { background-color: #fef3c7; color: #d97706; }
.status-pill.assigned { background-color: #dbeafe; color: #2563eb; }
.status-pill.new { background-color: #e0e7ff; color: #4338ca; }
.status-pill.resolved { background-color: #d1fae5; color: #059669; }
.status-pill.closed { background-color: #f1f5f9; color: #64748b; }

/* Theme Utility Classes */
.text-teal { color: #0877ee !important; }
.bg-teal { background-color: #0877ee !important; color: #ffffff !important; }
.btn-teal {
    background: linear-gradient(135deg, #0877ee 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(8, 119, 238, 0.25) !important;
    transition: all 0.2s ease !important;
}
.btn-teal:hover {
    background: linear-gradient(135deg, #0754b8 0%, #0274b3 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(8, 119, 238, 0.35) !important;
}

/* Modern Dynamic Back Button */
.btn-back-dynamic {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.9rem;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back-dynamic i {
    font-size: 0.95rem;
    color: #0877ee;
    transition: transform 0.2s ease;
}

.btn-back-dynamic:hover {
    background: #f0f7ff;
    border-color: #bae6fd;
    color: #0877ee;
    transform: translateX(-3px);
    box-shadow: 0 2px 8px rgba(8, 119, 238, 0.15);
}

.btn-back-dynamic:hover i {
    transform: translateX(-2px);
}

/* ==========================================================================
   Uniform Typography System (Requester & Admin Common Font Boldness)
   ========================================================================== */
.form-label {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.form-control, .form-select {
    color: #0f172a;
    font-weight: 500;
    font-size: 0.9rem;
    border-color: #cbd5e1;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Slate Text & Border Utility Classes */
.text-slate-600 { color: #475569 !important; }
.text-slate-700 { color: #334155 !important; }
.text-slate-800 { color: #1e293b !important; }
.border-slate-300 { border-color: #cbd5e1 !important; }

/* Consistent Heading & Subheading Weights */
.welcome-title {
    font-size: 1.75rem;
    font-weight: 800 !important;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.025em;
}

.welcome-subtitle {
    color: #475569 !important;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

