/* ==========================================================================
   Tamer Group Gov & Medical Sector Platform Style System
   Bilingual: Arabic (RTL) / English (LTR)
   Colors & Fonts aligned with Tamer Brand Manual 2026
   ========================================================================== */

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

:root {
    /* Tamer Official Brand Colors */
    --brand-green: #00754A;       /* Saudi Green - Primary */
    --brand-green-rgb: 0, 117, 74;
    --brand-green-hover: #005F3B;
    --brand-deep-blue: #203C4C;   /* Deep Blue - Secondary */
    --brand-deep-blue-rgb: 32, 60, 76;
    --brand-sage: #6BA180;        /* Supporting Sage */
    --brand-lime: #E5DE33;        /* Supporting Lime */
    --brand-teal: #1F949E;        /* Supporting Teal */
    --brand-light-blue: #BFE0E3;  /* Supporting Light Blue */
    --brand-olive: #94b040;       /* Supporting Olive */

    /* Premium Neutrals & Gradients */
    --bg-dark-slate: #0F171C;
    --bg-card-slate: #16222A;
    --border-slate: rgba(255, 255, 255, 0.08);
    --border-active-green: rgba(0, 117, 74, 0.4);
    --text-white: #FFFFFF;
    --text-muted: #8E9FA9;
    --text-light-gray: #D1DBE0;

    /* Status Colors */
    --status-success: #10B981;
    --status-warning: #F59E0B;
    --status-danger: #EF4444;

    /* Styling Properties */
    --font-tajawal: 'Tajawal', sans-serif;
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 15px rgba(0, 117, 74, 0.25);
    --shadow-text: 0 2px 4px rgba(0, 0, 0, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
}

/* Base Body & Direction Configuration */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-tajawal);
    background-color: var(--bg-dark-slate);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    transition: var(--transition-smooth);
}

/* Bilingual Direction Adaptations */
body[dir="rtl"] {
    text-align: right;
}
body[dir="ltr"] {
    text-align: left;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark-slate);
}
::-webkit-scrollbar-thumb {
    background: var(--brand-deep-blue);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-green);
}

/* Glassmorphism Frosted Layout Cards */
.glass-panel {
    background: rgba(var(--brand-deep-blue-rgb), 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-slate);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(var(--brand-green-rgb), 0.3);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

/* Sidebar Navigation Drawer styling */
.sidebar {
    width: 280px;
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(var(--brand-deep-blue-rgb), 0.9) 0%, rgba(15, 23, 28, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-inline-end: 1px solid var(--border-slate);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 100;
    transition: var(--transition-smooth);
}

/* SVG Logo Styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border-slate);
    margin-bottom: 25px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--brand-green);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    font-weight: bold;
    font-size: 24px;
    color: var(--text-white);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--text-white) 0%, var(--brand-light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Navigation Items */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    width: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    display: flex;
    justify-content: center;
}

.nav-link:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.03);
    padding-inline-start: 22px;
}

.nav-item.active .nav-link {
    color: var(--text-white);
    background: linear-gradient(90deg, rgba(var(--brand-green-rgb), 0.8) 0%, rgba(var(--brand-green-rgb), 0.2) 100%);
    box-shadow: var(--shadow-glow);
    border-inline-start: 4px solid var(--brand-green);
}

body[dir="rtl"] .nav-item.active .nav-link {
    background: linear-gradient(270deg, rgba(var(--brand-green-rgb), 0.8) 0%, rgba(var(--brand-green-rgb), 0.2) 100%);
}

/* Bottom Actions in Sidebar */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-slate);
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-slate);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-deep-blue);
    border: 2px solid var(--brand-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--brand-green);
    font-size: 16px;
    box-shadow: 0 0 10px rgba(0, 117, 74, 0.15);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Language and Logout Switchers */
.sidebar-buttons {
    display: flex;
    gap: 10px;
}

.btn-sidebar-icon {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-slate);
    color: var(--text-light-gray);
    padding: 10px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-tajawal);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-sidebar-icon:hover {
    background: rgba(var(--brand-green-rgb), 0.15);
    color: var(--text-white);
    border-color: var(--brand-green);
}

/* Main Container Window */
.main-content {
    margin-inline-start: 280px;
    width: calc(100% - 280px);
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: var(--transition-smooth);
}

/* Top Bar Styling */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-slate);
}

.page-title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.5px;
}

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

.header-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.system-time {
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-slate);
    padding: 8px 14px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Standard Premium Controls (Buttons, Inputs) */
.btn-primary {
    background: var(--brand-green);
    color: var(--text-white);
    border: none;
    padding: 12px 24px;
    font-family: var(--font-tajawal);
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: var(--brand-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 117, 74, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
    border: 1px solid var(--border-slate);
    padding: 12px 24px;
    font-family: var(--font-tajawal);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 28, 0.6);
    border: 1px solid var(--border-slate);
    color: var(--text-white);
    padding: 12px 16px;
    font-family: var(--font-tajawal);
    font-size: 14px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
    outline: none;
}

.form-control:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(0, 117, 74, 0.15);
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light-gray);
    margin-bottom: 8px;
    display: block;
}

/* Dashboard Filter Panel */
.filter-card {
    padding: 24px;
    margin-bottom: 10px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* RWD Adjustments */
@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Charts Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.chart-wrapper {
    grid-column: span 4;
    padding: 20px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Span configurations for different chart shapes */
.chart-wrapper.span-6 {
    grid-column: span 6;
}
.chart-wrapper.span-12 {
    grid-column: span 12;
}

@media (max-width: 992px) {
    .chart-wrapper, .chart-wrapper.span-6 {
        grid-column: span 12;
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light-gray);
}

.chart-container {
    position: relative;
    flex-grow: 1;
    width: 100%;
    height: 100%;
}

/* Add Task UI styles */
.task-content-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .task-content-layout {
        grid-template-columns: 1fr;
    }
}

.task-list-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box-container {
    position: relative;
}

.search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
body[dir="rtl"] .search-icon {
    right: 16px;
}
body[dir="ltr"] .search-icon {
    left: 16px;
}

body[dir="rtl"] .search-box-input {
    padding-right: 45px;
}
body[dir="ltr"] .search-box-input {
    padding-left: 45px;
}

/* Task Cards Table/List */
.task-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    text-align: inherit;
}

.task-table th {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-slate);
    background: rgba(255, 255, 255, 0.01);
}

.task-table td {
    padding: 16px 18px;
    font-size: 14px;
    color: var(--text-light-gray);
    border-bottom: 1px solid var(--border-slate);
    vertical-align: middle;
}

.task-row {
    transition: var(--transition-smooth);
}

.task-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Search Highlights */
.search-highlight {
    background-color: rgba(229, 222, 51, 0.3);
    color: var(--text-white);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* Status Pills */
.badge {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-complete {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-progress {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-high {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-med {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-low {
    background: rgba(31, 148, 158, 0.15);
    color: var(--brand-teal);
    border: 1px solid rgba(31, 148, 158, 0.25);
}

/* File Upload styling */
.pdf-upload-zone {
    border: 2px dashed var(--border-slate);
    border-radius: var(--border-radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pdf-upload-zone:hover {
    border-color: var(--brand-green);
    background: rgba(var(--brand-green-rgb), 0.02);
}

.pdf-upload-icon {
    font-size: 28px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pdf-upload-text {
    font-size: 13px;
    color: var(--text-light-gray);
}

.pdf-preview-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-slate);
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    margin-top: 10px;
    font-size: 13px;
}

.pdf-preview-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-light-blue);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-delete-btn {
    color: var(--status-danger);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* Interactive Team Tree Organizational Chart */
.tree-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
}

.tree-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transform: scale(0.98); /* Scaled up by 15% from 0.85 for improved premium readability */
    transform-origin: top center;
    margin-bottom: -15px; /* Compensate for scale empty space */
}

.tree-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: relative;
}

/* Cards in Team tree */
.tree-card {
    width: 145px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    position: relative;
    border: 1px solid var(--border-slate);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.015);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tree-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-deep-blue);
    border: 2px solid var(--brand-green);
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--brand-green);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tree-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tree-card-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-white);
}

.tree-card-role {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: -3px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 100%;
}

/* Speedometer Speed Gauge Canvas */
.speedometer-container {
    width: 80px;
    height: 48px;
    position: relative;
    margin-top: 1px;
}

.speedometer-canvas {
    width: 100%;
    height: 100%;
}

.speedometer-text {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-green);
    text-shadow: var(--shadow-text);
}

/* Elegant KPI Keyword Chip Tags */
.kpi-keyword-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-sage);
    background: rgba(107, 161, 128, 0.08);
    border: 1px solid rgba(107, 161, 128, 0.2);
    border-radius: 4px;
    margin-inline-end: 4px;
    margin-block: 2px;
    font-family: 'Tajawal', monospace;
}


/* KPIs View & Performance solver cards */
.kpi-layout-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 25px;
}

.kpi-summary-box {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kpi-cards-panel {
    grid-column: span 8;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 992px) {
    .kpi-summary-box, .kpi-cards-panel {
        grid-column: span 12;
    }
}

.kpi-score-ring-card {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.kpi-ring-widget {
    width: 160px;
    height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-ring-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
}

.kpi-ring-score {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.kpi-ring-score span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
    margin-top: 4px;
}

/* KPI Goal Card list */
.goal-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.goal-title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goal-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.goal-category {
    font-size: 12px;
    color: var(--brand-teal);
    font-weight: 500;
}

.goal-meta-pills {
    display: flex;
    gap: 10px;
}

.goal-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Progress bar with threshold indicator */
.goal-progress-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goal-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

.goal-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-threshold-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--text-white);
    opacity: 0.5;
    z-index: 2;
}

/* System Admin Panels */
.admin-table-panel {
    padding: 24px;
}

/* Luxury Password Force-Reset Fullscreen Overlay Modal */
.force-password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 28, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: none; /* Blocked until activated in JS */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
}

.password-reset-box {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    border: 1px solid var(--border-active-green);
    box-shadow: 0 15px 45px rgba(0, 117, 74, 0.15);
}

.reset-icon-badge {
    width: 65px;
    height: 65px;
    border-radius: var(--border-radius-lg);
    background: rgba(0, 117, 74, 0.15);
    border: 1px solid var(--brand-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--brand-green);
    align-self: center;
    box-shadow: var(--shadow-glow);
}

.reset-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    text-align: center;
}

.reset-desc {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin-top: -10px;
}

/* Traditional Login Frame styling */
.login-view-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark-slate) 0%, var(--brand-deep-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 45px 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Pagination Control Panel */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-slate);
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-btn-group {
    display: flex;
    gap: 8px;
}

.btn-page {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-slate);
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-tajawal);
    transition: var(--transition-smooth);
}

.btn-page:hover:not(:disabled) {
    background: var(--brand-green);
    border-color: var(--brand-green);
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Custom CSS Tooltip styles */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card-slate);
    border: 1px solid var(--border-slate);
    color: var(--text-white);
    padding: 6px 10px;
    font-size: 11px;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 10;
}
[data-tooltip]:hover::after {
    opacity: 1;
    bottom: 115%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animated-view {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Luxury KPI Tasks Detail Modal Overlay */
.kpi-tasks-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 28, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none; /* Blocked until activated in JS */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.kpi-tasks-box {
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid var(--border-active-green);
    box-shadow: 0 15px 45px rgba(0, 117, 74, 0.25);
}

.modal-close-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-slate);
    padding-bottom: 15px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    color: var(--status-danger);
    transform: scale(1.1);
}

/* Alarm Bell Dropdown & Overdue items styling */
.alarm-dropdown {
    transform-origin: top left;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alarm-item {
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-slate);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
}

.alarm-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-teal);
}

/* PDF evaluation printing layout overrides */
@media print {
    body * {
        visibility: hidden;
    }
    #print-evaluation-sheet, #print-evaluation-sheet * {
        visibility: visible;
    }
    #print-evaluation-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: #000;
        background: #fff;
    }
}

/* ==========================================================================
   Tamer Gov Portal Mobile & Tablet Responsiveness System Overrides
   Ensures gorgeous, clean layouts on iPhone, iPad, Android & all mobile screens
   ========================================================================== */

@media (max-width: 992px) {
    /* 1. Transform vertical fixed sidebar to horizontal fluid top navbar */
    .sidebar {
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        position: relative !important;
        padding: 15px 20px !important;
        flex-direction: column !important;
        gap: 15px !important;
        border-inline-end: none !important;
        border-bottom: 1px solid var(--border-slate) !important;
    }
    
    .logo-container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        border-bottom: none !important;
    }
    
    .nav-menu {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .nav-item {
        margin-bottom: 0 !important;
    }

    .nav-link {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    .sidebar-footer {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-top: 1px solid var(--border-slate) !important;
        padding-top: 15px !important;
        margin-top: 5px !important;
    }

    .user-profile-card {
        padding: 0 !important;
        border: none !important;
        background: none !important;
    }

    /* 2. Fluid main content expanding to full-screen width */
    .main-content {
        margin-inline-start: 0 !important;
        width: 100% !important;
        padding: 20px !important;
        gap: 20px !important;
    }

    /* 3. Wrap sticky headers cleanly */
    .top-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .header-meta {
        width: 100% !important;
        justify-content: space-between !important;
    }
}

@media (max-width: 576px) {
    /* 4. Tighter grids for forms and cards on extremely small phones */
    .filter-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .login-card {
        padding: 30px 20px !important;
        max-width: 90% !important;
    }

    .password-reset-box {
        padding: 25px !important;
        max-width: 95% !important;
    }

    .pagination-controls {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
    }
    
    /* Responsive tables support */
    .task-table-wrapper {
        overflow-x: auto !important;
    }
}
