/**
 * Secure360 - Design System Tokens & Base Stylesheet
 * Enterprise Security Operations SaaS Palette
 * Strictly Aligned with Approved UI Reference Screenshots
 */

:root {
    /* Palette */
    --color-bg: #f8fafc;            /* Soft blue-gray page background */
    --color-surface: #ffffff;       /* Pure white card/panel */
    --color-surface-hover: #f1f5f9; /* Subtle hover state */
    --color-border: #e2e8f0;        /* Clean light border */
    --color-border-focus: #2563eb;
    
    /* Typography */
    --color-text-primary: #0f172a;  /* Dark navy typography */
    --color-text-secondary: #475569;/* Slate secondary text */
    --color-text-muted: #94a3b8;    /* Faint/placeholder text */
    
    /* Brand & Actions */
    --color-primary: #1d4ed8;       /* Primary blue */
    --color-primary-accent: #2563eb;/* Bright action blue */
    --color-primary-hover: #1e40af;
    --color-primary-light: #eff6ff; /* Soft blue tint for pills/active */
    
    /* Status Colors */
    --color-success: #10b981;
    --color-success-bg: #ecfdf5;
    --color-danger: #ef4444;
    --color-danger-bg: #fef2f2;
    --color-warning: #f59e0b;
    --color-warning-bg: #fffbeb;

    /* Spacing & Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);

    /* Layout Dimensions */
    --sidebar-width: 250px;
    --topbar-height: 64px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Layout Containers */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
}

.sidebar-logo-shield {
    width: 28px;
    height: 28px;
    color: var(--color-primary-accent);
}

.sidebar-nav {
    padding: 1.25rem 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text-primary);
}

.nav-item.active,
.nav-item:active {
    background-color: var(--color-primary-accent);
    color: #ffffff;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 0.875rem;
    border-top: 1px solid var(--color-border);
}

/* Main Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.app-topbar {
    height: var(--topbar-height);
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-search {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.85rem;
    width: 320px;
    gap: 0.6rem;
}

.topbar-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    width: 100%;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--color-primary-accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Page Content */
.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 2.25rem 1.75rem;
    min-width: 0;
}

/* Breadcrumb */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.875rem;
}

.breadcrumb-nav a {
    color: var(--color-primary-accent);
    text-decoration: none;
}

/* Page Header */
.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: #eff6ff;
    color: var(--color-primary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title-icon svg {
    width: 22px;
    height: 22px;
}

.page-title-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--color-primary-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: #ffffff;
}

.btn-outline {
    background-color: #ffffff;
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    background-color: var(--color-surface-hover);
}

.btn-danger-outline {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-danger);
    padding: 0.4rem;
}

.btn-danger-outline:hover {
    background-color: var(--color-danger-bg);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

/* Cards & Content Panels */
.card-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.form-input.no-icon {
    padding-left: 1rem;
}

.form-input:focus {
    border-color: var(--color-primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-textarea:focus {
    border-color: var(--color-primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.active {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.status-pill.inactive, .status-pill.suspended {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

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

/* Tables */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.data-table th {
    padding: 0.75rem 1rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--color-text-primary);
    vertical-align: middle;
}

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

/* Circular Letter / Image Avatar */
.table-avatar-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    background-color: #dbeafe;
    color: #1d4ed8;
}

.table-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
}

.filter-pill {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text-secondary);
    cursor: pointer;
    text-decoration: none;
}

.filter-pill.active {
    background-color: var(--color-primary-accent);
    color: #ffffff;
    border-color: var(--color-primary-accent);
}

/* Dynamic Sites Row in Client Registration */
.site-row-card {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 1.5fr 36px;
    gap: 0.875rem;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.site-badge-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

/* Guard Photo Upload Dropzone */
.photo-dropzone {
    border: 1px dashed #93c5fd;
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.photo-dropzone:hover {
    border-color: var(--color-primary-accent);
}

/* Alerts */
.alert-flash {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-flash.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-flash.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   SECURE360 ENTERPRISE SAAS DESIGN SYSTEM ENHANCEMENTS
   ========================================================================== */

/* Page Responsive Container - Full desktop width utilization */
.page-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Form Back Navigation Control */
.form-back-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.15s ease, transform 0.15s ease;
    line-height: 1.2;
    cursor: pointer;
    width: fit-content;
}

.form-back-nav svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.25;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.form-back-nav:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.form-back-nav:hover svg {
    transform: translateX(-2px);
}

/* Breadcrumbs */
.app-breadcrumb,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.875rem;
    line-height: 1.4;
}

.app-breadcrumb a,
.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.app-breadcrumb a:hover,
.breadcrumb a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.app-breadcrumb .breadcrumb-separator,
.breadcrumb .breadcrumb-separator {
    color: #cbd5e1;
    font-weight: 400;
}

.app-breadcrumb .breadcrumb-current,
.breadcrumb .breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
}

/* Standard Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.page-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.page-header-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* Enterprise Card Component */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.card-padded {
    padding: 1.75rem 2rem;
}

/* Form Controls & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.form-label .required-star {
    color: #ef4444;
    margin-left: 0.15rem;
}

.form-control,
.form-select {
    width: 100%;
    height: 44px;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    line-height: 1.4;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

.form-control:hover,
.form-select:hover {
    border-color: #94a3b8;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background-color: #ffffff;
}

.form-control[readonly],
.form-control:disabled {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: default;
}

.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.25rem;
    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 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    cursor: pointer;
}

textarea.form-control {
    height: auto;
    min-height: 110px;
    resize: vertical;
    padding: 0.75rem 1rem;
}

/* Input Icon Wrapper */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-wrapper .form-control {
    padding-left: 2.5rem;
}

.input-icon-wrapper textarea.form-control {
    padding-left: 2.5rem;
}

.input-icon-wrapper.textarea-wrapper .input-icon {
    top: 1.15rem;
    transform: none;
}

/* Toolbar & Filter Bar - Full width distribution */
.toolbar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    width: 100%;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 9999px;
    gap: 0.25rem;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
}

.filter-tab:hover {
    color: #0f172a;
}

.filter-tab.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

/* Unified Global Search Bar Design */
.toolbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.toolbar-search .input-icon-wrapper,
.search-bar-wrapper,
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 320px;
    max-width: 100%;
}

.toolbar-search .input-icon,
.search-bar-wrapper .search-icon,
.search-input-wrapper svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-search .form-control,
.search-bar-wrapper .form-control,
.search-input-wrapper .filter-input,
.search-input-wrapper input {
    width: 100%;
    height: 44px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    line-height: 1.4;
}

.toolbar-search .form-control::placeholder,
.search-bar-wrapper .form-control::placeholder,
.search-input-wrapper .filter-input::placeholder,
.search-input-wrapper input::placeholder {
    color: #94a3b8;
    font-size: 0.8125rem;
}

.toolbar-search .form-control:hover,
.search-bar-wrapper .form-control:hover,
.search-input-wrapper .filter-input:hover,
.search-input-wrapper input:hover {
    border-color: #94a3b8;
}

.toolbar-search .form-control:focus,
.search-bar-wrapper .form-control:focus,
.search-input-wrapper .filter-input:focus,
.search-input-wrapper input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background-color: #ffffff;
}

.btn-search-clear {
    font-size: 0.75rem;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.btn-search-clear:hover {
    background-color: #fef2f2;
}

/* Polished Table Styling & Substantial Container */
.table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 520px;
    width: 100%;
}

.table-responsive {
    width: 100%;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.clients-table,
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    text-align: left;
}

.clients-table thead th,
.data-table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.clients-table tbody tr,
.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.clients-table tbody tr:hover,
.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.clients-table tbody td,
.data-table tbody td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.clients-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Client Identity Typography */
.client-info-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    border: 1px solid #dbeafe;
}

.client-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9375rem;
    text-decoration: none;
    line-height: 1.3;
    display: block;
    transition: color 0.15s ease;
}

.client-title:hover {
    color: #2563eb;
}

.client-code-tag {
    font-size: 0.75rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Standardized Site Badges */
.sites-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.badge-site-count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 0.65rem;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.badge-site-name {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0 0.6rem;
    height: 28px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-site-more {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    padding-left: 0.2rem;
}

/* Polished Active / Inactive Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.75rem;
    height: 26px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-status.active {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-status.inactive {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

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

/* Action Buttons in Table */
.action-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-action-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    height: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

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

.btn-action-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.btn-action-delete:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

/* Table Footer & Pagination */
.table-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pagination {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.95rem;
    height: 32px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-pagination:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-pagination:disabled {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   REGISTER CLIENT & SITES FULL-PAGE WORKSPACE
   ========================================================================== */

.register-layout-grid {
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(520px, 1.35fr);
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    flex: 1;
    min-height: calc(100vh - 210px);
}

@media (max-width: 1100px) {
    .register-layout-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

.register-panel {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    height: 100%;
}

.register-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    flex: 1;
}

/* Card Section Header */
.card-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #f1f5f9;
}

.card-section-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.card-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.card-section-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.card-section-icon.green {
    background: #f0fdf4;
    color: #16a34a;
}

.card-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.card-section-desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* Assigned Site Cards */
.site-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.site-card:hover {
    border-color: #cbd5e1;
}

.site-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e2e8f0;
}

.site-card-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-remove-site {
    background: #ffffff;
    border: 1px solid #fecaca;
    color: #ef4444;
    cursor: pointer;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.btn-remove-site:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #dc2626;
}

/* Site Field Grids */
.site-grid-row-1 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.1rem;
}

.site-grid-row-2 {
    margin-bottom: 1.1rem;
}

.site-grid-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .site-grid-row-1,
    .site-grid-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Form Actions Bottom-Right */
.form-actions-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   Standardized Admin Filter & Search Components (Consistent 44px Height & 10px Radius)
   ========================================================================== */
.filter-select,
.filter-date-input,
.filter-input-control {
    height: 44px;
    padding: 0.5rem 0.875rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.4;
}

.filter-select {
    padding-right: 2.25rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    appearance: none;
    -webkit-appearance: none;
}

.filter-select:hover,
.filter-date-input:hover,
.filter-input-control:hover {
    border-color: #94a3b8;
}

.filter-select:focus,
.filter-date-input:focus,
.filter-input-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background-color: #ffffff;
}

/* Reports Filter Toolbar */
.reports-filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.reports-toolbar-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-control-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-control-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.btn-filter-submit {
    height: 44px;
    padding: 0 1.25rem;
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.btn-filter-submit:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-filter-reset {
    height: 44px;
    padding: 0 1rem;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.btn-filter-reset:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

@media (max-width: 900px) {
    .reports-toolbar-form {
        gap: 0.625rem;
    }
    .reports-toolbar-form .input-icon-wrapper,
    .reports-toolbar-form .toolbar-search {
        width: 100%;
        flex: 1;
        min-width: 240px;
    }
}

@media (max-width: 640px) {
    .reports-toolbar-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-control-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .filter-select,
    .filter-date-input,
    .reports-toolbar-form .input-icon-wrapper,
    .btn-filter-submit,
    .btn-filter-reset {
        width: 100% !important;
    }
}

/* ==========================================================================
   Admin Operations Dashboard Styling
   ========================================================================== */
/* ==========================================================================
   Admin Operations Dashboard Styling (Security Operations Console)
   ========================================================================== */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.dashboard-intro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-greeting {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.25;
}

.dashboard-subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
}

.dashboard-date-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metrics-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.875rem;
}

.metric-card-compact {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    height: 102px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card-compact:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 6px -1px rgba(15, 23, 42, 0.06);
}

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

.metric-label {
    font-size: 0.725rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.metric-icon-box.blue {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.metric-icon-box.green {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #dcfce7;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.metric-number {
    font-size: 1.625rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

.metric-subtext {
    font-size: 0.725rem;
    color: #94a3b8;
    line-height: 1;
}

/* Operational Top Grid: Live Map (Left Dominant) + Today's Attendance & Actions (Right) */
.ops-grid-top {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.dashboard-map-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    height: 100%;
}

.map-header-bar {
    padding: 0.875rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.map-legend-group {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.map-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.map-legend-dot.blue { background: #2563eb; }
.map-legend-dot.green { background: #16a34a; }
.map-legend-dot.gray { background: #94a3b8; }

#dashboardMap {
    height: 440px;
    width: 100%;
    z-index: 1;
    flex: 1;
}

.ops-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ops-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
}

.ops-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.ops-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.ops-card-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.15rem 0 0 0;
}

.ops-card-link {
    font-size: 0.75rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s ease;
}

.ops-card-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.att-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.att-mini-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.875rem;
}

.att-mini-card.active-card {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.att-mini-label {
    font-size: 0.725rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.att-mini-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.att-mini-card.active-card .att-mini-number {
    color: #166534;
}

.quick-actions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.btn-quick-action-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    font-size: 0.775rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-quick-action-row:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

/* Bottom Operational Grid: Recent Attendance (Left) + Recent Activity (Right) */
.ops-grid-bottom {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.compact-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.compact-data-table th {
    text-align: left;
    padding: 0.625rem 0.875rem;
    font-size: 0.725rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.compact-data-table td {
    padding: 0.75rem 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.compact-data-table tr:hover td {
    background-color: #f8fafc;
}

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

.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.activity-feed-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.activity-dot-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.8125rem;
    color: #1e293b;
    line-height: 1.4;
}

.activity-time {
    font-size: 0.725rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.badge-clean-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}

.badge-clean-status.on-duty {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge-clean-status.completed {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

@media (max-width: 1100px) {
    .metrics-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    .ops-grid-top,
    .ops-grid-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .metrics-grid-5 {
        grid-template-columns: 1fr;
    }
    .att-mini-grid,
    .quick-actions-list {
        grid-template-columns: 1fr;
    }
    .dashboard-intro-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==========================================================================
   SETTINGS PAGE LAYOUT & CONTROLS
   ========================================================================== */

.settings-layout-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

.settings-nav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.625rem;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.settings-nav-item svg {
    width: 18px;
    height: 18px;
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.settings-nav-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.settings-nav-item:hover svg {
    color: #0f172a;
}

.settings-nav-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.settings-nav-item.active svg {
    color: #2563eb;
}

.settings-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.875rem 2rem;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    width: 100%;
    min-width: 0;
}

.settings-tab-pane {
    display: none;
    width: 100%;
}

.settings-tab-pane.active {
    display: block;
    animation: fadeIn 0.15s ease-in;
}

.settings-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.settings-section-desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.settings-form-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.settings-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    width: 100%;
}

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

/* Toggle Switch Control */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 1.5rem;
}

.settings-toggle-row:last-child {
    border-bottom: none;
}

.settings-toggle-info {
    flex: 1;
}

.settings-toggle-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.settings-toggle-desc {
    font-size: 0.775rem;
    color: #64748b;
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.2s ease;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2563eb;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

@media (max-width: 860px) {
    .settings-layout-grid {
        grid-template-columns: 1fr;
    }
    .settings-nav-card {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .settings-nav-item {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
    }
}

/* ==========================================================================
   HEADER NOTIFICATION CENTER & POPOVER
   ========================================================================== */

.notification-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    padding: 0;
    outline: none;
}

.notification-bell-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.notification-bell-btn:focus-visible {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2563eb;
}

.notification-bell-btn.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px #ffffff;
    line-height: 1;
}

.notification-badge.hidden {
    display: none;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 2rem);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: notifSlideIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-popover.open {
    display: flex;
}

@keyframes notifSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.125rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.notif-header-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.notif-mark-all-btn {
    font-size: 0.725rem;
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.notif-mark-all-btn:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.notification-popover-body {
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8125rem 1.125rem;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    cursor: pointer;
    position: relative;
    outline: none;
}

.notification-item:last-child {
    border-bottom: none;
}

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

.notification-item:focus-visible {
    background: #f1f5f9;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e5f0fe;
}

.notif-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-icon-circle.green {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

.notif-icon-circle.blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.notif-icon-circle.amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.notif-icon-circle.red {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.notif-item-msg {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.notif-item-time {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty-box {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.notif-empty-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.5rem auto;
    color: #cbd5e1;
}

.notif-empty-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.2rem;
}

.notif-empty-desc {
    font-size: 0.725rem;
    color: #94a3b8;
    margin: 0;
}

@media (max-width: 480px) {
    .notification-popover {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}

/* ==========================================================================
   Secure360 Global Standardized Pagination (Reference: Attendance Page)
   ========================================================================== */
.table-footer-pagination {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: #ffffff;
}

.pagination-info {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled):not(.disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.page-btn:disabled,
.page-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
