/* ================================================================
   ManageMax — Dark Futuristic Theme
   ================================================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d0d14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(37, 99, 235, 0.2);
    --accent-cyan: #2563eb;
    --accent-green: #94a3b8;
    --accent-cyan-dim: rgba(37, 99, 235, 0.15);
    --accent-green-dim: rgba(148, 163, 184, 0.15);
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --text-muted: #555;
    --danger: #ff4757;
    --danger-dim: rgba(255, 71, 87, 0.12);
    --success: #2ed573;
    --font-latin: 'Inter', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    --sidebar-width: 240px;
    --navbar-height: 56px;
    --bottom-tabs-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --border-row: rgba(255, 255, 255, 0.02);
    --primary-color: var(--accent-cyan);
    --info-color: #3b82f6;
}

/* Light theme */
html[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(37, 99, 235, 0.25);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --danger-dim: rgba(255, 71, 87, 0.15);
    --border-row: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .glass-card:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.08);
}

html[data-theme="light"] .btn-primary {
    color: #fff;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-latin);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: var(--accent-green);
}

/* ── Glass Card ────────────────────────────────────────────── */

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.06);
}

/* ── Icons ─────────────────────────────────────────────────── */

.fi {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* ── Layouts ───────────────────────────────────────────────── */

.auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    position: relative;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-content {
    flex: 1;
    margin-inline-start: var(--sidebar-width);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.page-content {
    padding: 1.5rem;
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ── Sidebar ───────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-inline-end: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 1.5rem 0;
}

.sidebar-logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 1rem;
}

.logo-img {
    height: auto;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

/* Auth Pages: Large but not massive */
.auth-logo .logo-img {
    height: 80px;
    margin: 0 auto;
}

.navbar-logo.logo-img {
    height: 48px;
    display: none; /* Hidden on desktop by default */
}

.landing-logo.logo-img {
    height: 48px;
    display: block;
}

.sidebar-logo .logo-img {
    height: 38px;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.logo-accent {
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0.75rem;
    flex: 1;
}

.sidebar-nav--bottom {
    flex: 0 0 auto;
    padding: 0 0.75rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 0.75rem;
    margin-top: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
    font-size: 0.9rem;
}

.sidebar-link svg,
.sidebar-link .fi {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

[dir="rtl"] .sidebar-link .fi {
    margin-left: 0.75rem;
    margin-right: 0;
}

.sidebar-link:hover {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.sidebar-link.active {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
    border-inline-start: 3px solid var(--accent-cyan);
}

/* ── Top Navbar ────────────────────────────────────────────── */

.top-navbar {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.navbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.navbar-user {
    color: var(--text-secondary);
    font-size: 0.8rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Bottom Tabs (Mobile) ──────────────────────────────────── */

.bottom-tabs {
    display: none;
    position: fixed;
    bottom: 1.25rem;
    left: 1rem;
    right: 1rem;
    height: 64px;
    background: rgba(13, 13, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .bottom-tabs {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 500;
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    min-width: 0;
}

/* Hide text labels in bottom nav — icons only */
.tab-item span {
    display: none;
}

.tab-item svg,
.tab-item .fi {
    width: 20px;
    height: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.tab-item.active {
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.tab-item.active svg {
    filter: drop-shadow(0 0 8px var(--accent-cyan-dim));
}

.navbar-user {
    color: var(--text-primary);
    font-weight: 500;
}

.tab-item:active {
    transform: scale(0.92);
}

/* ── Auth Pages ────────────────────────────────────────────── */

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    padding: 2.5rem;
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
    min-height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo .logo-text {
    font-size: 2.5rem;
}

.auth-logo .logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.auth-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-store-name {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

/* Back to Home Button */
.back-home-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
    z-index: 10;
}

html[dir="rtl"] .back-home-btn {
    left: auto;
    right: 1rem;
}

@media (max-width: 480px) {
    .back-home-btn { top: 1rem; left: 1rem; }
    html[dir="rtl"] .back-home-btn { left: auto; right: 1rem; }
}

.back-home-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

html[data-theme="light"] .back-home-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Auth Role Selector Grid */
.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.role-card {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.role-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    flex: 1; /* Expands to fill height of .role-card */
}

.role-card-inner i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.role-card-inner span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.role-card:hover .role-card-inner {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.role-card:hover .role-card-inner i {
    color: var(--text-primary);
    transform: scale(1.1);
}

.role-radio-input:checked + .role-card-inner {
    border-color: var(--accent-cyan);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

.role-radio-input:checked + .role-card-inner i {
    color: var(--accent-cyan);
    transform: scale(1.1);
}

.role-radio-input:checked + .role-card-inner span {
    color: var(--text-primary);
}

/* Light mode adjustments */
html[data-theme="light"] .role-card-inner {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .role-radio-input:checked + .role-card-inner {
    background: rgba(37, 99, 235, 0.05); /* blueish for light */
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.1);
}

html[data-theme="light"] .role-radio-input:checked + .role-card-inner i {
    color: var(--accent-blue);
}

/* ══════════════════════════════════════════════════
   LANDING PAGE — styles moved to landing.css
   ══════════════════════════════════════════════════ */



/* ── Forms ──────────────────────────────────────────────────── */

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

.form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
    min-height: 48px;
}

.form-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

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

/* Input with icon wrapper */
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.1rem;
    transition: color 0.2s;
    left: 1rem;
}

.input-icon-wrapper .form-input {
    padding-left: 2.85rem !important;
}

html[dir="rtl"] .input-icon-wrapper i {
    left: auto;
    right: 1rem;
}

html[dir="rtl"] .input-icon-wrapper .form-input {
    padding-left: 0.9rem !important;
    padding-right: 2.85rem !important;
}

.input-icon-wrapper .form-input:focus ~ i {
    color: var(--accent-cyan);
}

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

select.form-input {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-inline-end: 2rem;
}


html[dir="rtl"] select.form-input {
    background-position: left 0.75rem center;
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    color: var(--text-primary);
}

.btn:hover {
    filter: brightness(1.1);
}

/* RTL Icon Flips */
html[dir="rtl"] .fi-rr-arrow-right,
html[dir="rtl"] .fi-rr-angle-right {
    transform: scaleX(-1);
    display: inline-block;
}

.btn-primary {
    background: var(--accent-cyan);
    color: #fff;
    border-color: var(--accent-cyan);
}

.btn-primary:hover {
    background: #1d4ed8; /* Solid darker blue for visibility */
    color: #fff !important;
    border-color: #1d4ed8;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

html[data-theme="light"] .btn-primary:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
}

/* RTL Arrow Fix */
html[dir="rtl"] .fi-rr-arrow-right,
html[dir="rtl"] .fi-rr-sign-in-alt {
    transform: scaleX(-1);
}

html[dir="rtl"] .fi-rr-arrow-left {
    transform: scaleX(-1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-glass);
}

.btn-ghost:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger-dim);
}

.btn-danger:hover {
    background: var(--danger-dim);
    border-color: var(--danger);
}

.btn-white {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
}

.btn-white:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #000 !important;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    min-height: 36px;
}

.btn-full {
    width: 100%;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── Alerts ────────────────────────────────────────────────── */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid;
}

.alert-error {
    background: var(--danger-dim);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-success {
    background: rgba(46, 213, 115, 0.12);
    border-color: var(--success);
    color: var(--success);
}

/* ── Page Header ───────────────────────────────────────────── */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

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

/* ── Tables ────────────────────────────────────────────────── */

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.data-table thead th {
    text-align: start;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--border-glass);
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-row);
    vertical-align: middle;
}

.table-row-hover:hover {
    background: var(--bg-card-hover);
}

/* ── Mobile Card Layout (replaces tables on small screens) ── */

.mobile-cards {
    display: none;
}

.mobile-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
}

.mobile-card-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.mobile-card-value {
    font-size: 0.88rem;
    color: var(--text-primary);
    text-align: end;
    word-break: break-word;
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.6rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.mobile-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-glass);
}

.mobile-card-actions .btn {
    flex: 1;
}

/* ── Badges ────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.badge-admin {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.badge-manager {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.badge-special_user {
    background: rgba(255, 200, 50, 0.12);
    color: #ffc832;
}

.badge-worker {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

/* ── Info Card ─────────────────────────────────────────────── */

.info-card {
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
}

.info-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

/* ── Tabs ──────────────────────────────────────────────────── */

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

.tab-content {
    min-height: 200px;
}

/* ── Section ───────────────────────────────────────────────── */

.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* ── Summary Cards ─────────────────────────────────────────── */

.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
    padding: 1rem;
}

.summary-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.accent-text {
    color: var(--accent-cyan);
}

.danger-text {
    color: var(--danger);
}

/* ── Detail Cards ──────────────────────────────────────────── */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.detail-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.detail-dates {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.detail-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.detail-card-action {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-glass);
}

/* ── Filter Bar ────────────────────────────────────────────── */

.filter-bar {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-form .form-group {
    flex: 1;
    min-width: 140px;
}

/* ── Month Selector ────────────────────────────────────────── */

.month-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.month-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.month-nav-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-dim);
}

.month-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 160px;
    text-align: center;
}

/* ── Modals ────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-overlay .modal.glass-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-card);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* ── Clock In/Out ──────────────────────────────────────────── */

.clock-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-height) - 3rem);
    min-height: calc(100dvh - var(--navbar-height) - 3rem);
}

.clock-container {
    text-align: center;
    max-width: 400px;
    width: 100%;
    padding: 0 1rem;
}

.clock-display {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.clock-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.clocked-in .status-dot {
    background: var(--accent-green);
}

.clock-info {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.clock-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.clock-btn-in {
    background: transparent;
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.clock-btn-in:hover,
.clock-btn-in:active {
    background: var(--accent-cyan-dim);
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.25), inset 0 0 40px rgba(37, 99, 235, 0.05);
}

.clock-btn-out {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.clock-btn-out:hover,
.clock-btn-out:active {
    background: var(--danger-dim);
    box-shadow: 0 0 40px rgba(255, 71, 87, 0.3), inset 0 0 40px rgba(255, 71, 87, 0.05);
}

.clock-geo-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* ── Language Switcher ─────────────────────────────────────── */

.lang-switcher {
    display: flex;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 0.15rem;
}

.lang-btn {
    padding: 0.35rem 0.65rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    min-width: 36px;
    text-align: center;
}

.lang-btn.active {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.lang-btn:hover {
    color: var(--accent-cyan);
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.theme-icon {
    display: none;
}

.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

html[data-theme="light"] .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-icon-moon {
    display: block;
}

/* ── Pagination ────────────────────────────────────────────── */

.pagination {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* ── Empty State ───────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

/* ── Link Accent ───────────────────────────────────────────── */

.link-accent {
    color: var(--accent-cyan);
    font-weight: 500;
}

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

/* ── Animations ────────────────────────────────────────────── */

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse-glow {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
    }

    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.3), 0 0 80px rgba(37, 99, 235, 0.1);
    }
}

/* ── Scrollbar ─────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── RTL Adjustments ───────────────────────────────────────── */

html[dir="rtl"] .sidebar-link.active {
    border-inline-start: 3px solid var(--accent-cyan);
    border-inline-end: none;
}

html[dir="rtl"] .action-btns {
    flex-direction: row-reverse;
}

/* ================================================================
   RESPONSIVE — Tablet (768px)
   ================================================================ */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-inline-start: 0;
    }

    .navbar-logo.logo-img {
        display: block !important;
    }

    .bottom-tabs {
        display: flex;
    }

    .page-content {
        padding: 1rem 0.75rem;
        padding-bottom: calc(64px + 2.5rem + var(--safe-bottom));
    }

    .filter-row {
        justify-content: center;
        text-align: center;
    }

    .filter-bar.glass-card,
    .month-nav.glass-card {
        flex: 1 1 100% !important;
        justify-content: center !important;
    }

    .filter-form {
        justify-content: center;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

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

    .page-header .btn {
        width: 100%;
    }

    /* Tables become cards on mobile */
    .table-container .data-table {
        display: none;
    }

    .mobile-cards {
        display: block;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .filter-form .form-group {
        min-width: 0;
    }

    .filter-form .btn {
        width: 100%;
    }

    .summary-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        justify-items: center;
    }

    .summary-card {
        padding: 1rem 0.75rem;
        max-width: 260px;
    }

    .summary-value {
        font-size: 1.5rem;
    }

    .summary-label {
        font-size: 0.75rem;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .clock-page {
        min-height: calc(100dvh - var(--navbar-height) - var(--bottom-tabs-height) - var(--safe-bottom) - 2rem);
    }

    .clock-display {
        font-size: 2.75rem;
    }

    .clock-btn {
        width: 160px;
        height: 160px;
        font-size: 0.95rem;
    }

    .navbar-user {
        display: none;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .glass-card {
        padding: 1rem;
    }

    /* Modals go full-width on mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        max-width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: var(--radius) var(--radius) 0 0;
        padding: 1.5rem 1rem;
        padding-bottom: calc(1.5rem + var(--safe-bottom));
    }

    .modal-overlay.open .modal {
        transform: translateY(0);
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        margin-inline: -0.75rem;
        padding-inline: 0.75rem;
    }

    .tab {
        padding: 0.7rem 1rem;
        font-size: 0.82rem;
    }

    .month-label {
        font-size: 0.95rem;
        min-width: 120px;
    }

    .empty-state {
        padding: 2rem 1rem;
    }
}

/* ================================================================
   RESPONSIVE — Small phone (380px)
   ================================================================ */

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

    .auth-card {
        padding: 1.25rem 1rem;
    }

    .auth-logo .logo-text {
        font-size: 2rem;
    }

    .clock-display {
        font-size: 2.25rem;
    }

    .clock-btn {
        width: 140px;
        height: 140px;
        font-size: 0.85rem;
    }
}

/* ================================================================
   VOICE COMMAND SYSTEM — Creative & Professional Redesign
   ================================================================ */

/* ── Trigger Types ─────────────────────────────────────────── */

/* 1. Sidebar Widget (Desktop) */
.sidebar-voice {
    margin: 1.25rem 0.75rem 0.5rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: calc(100% - 1.5rem);
    text-align: left;
}

.sidebar-voice:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(37, 99, 235, 0.18) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.sidebar-voice:active {
    transform: translateY(0);
}

/* 2. Floating Pill (Mobile) */
.voice-pill-mobile {
    position: fixed;
    bottom: calc(var(--bottom-tabs-height) + var(--safe-bottom) + 32px);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    /* Desktop hidden */
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(37, 99, 235, 0.2);
    /* Semi-transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 200;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    margin-right: 0.5rem;
}

[dir="rtl"] .btn-back {
    margin-right: 0;
    margin-left: 0.5rem;
    transform: scaleX(-1);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-1px);
}

[dir="rtl"] .btn-back:hover {
    transform: scaleX(-1) translateY(-1px);
}

.btn-back:active {
    transform: translateY(0) scale(0.95);
}

@media (max-width: 1024px) {
    .sidebar-voice {
        display: none;
    }

    .voice-pill-mobile {
        display: flex;
    }
}

/* ── Inner Components ─────────────────────────────────────────── */

.sv-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-voice:hover .sv-glow {
    opacity: 1;
}

.sv-icon,
.vp-icon {
    width: 38px;
    height: 38px;
    background: #6366f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.vp-icon {
    width: 24px;
    height: 24px;
    background: transparent;
    box-shadow: none;
}

.sv-icon i,
.vp-icon i,
.sv-icon svg,
.vp-icon svg {
    width: 20px;
    height: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-text {
    display: flex;
    flex-direction: column;
}

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

.sv-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sv-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 12px;
    margin-left: auto;
}

.sv-bar {
    width: 2px;
    height: 4px;
    background: #6366f1;
    border-radius: 1px;
}

/* ── States ─────────────────────────────────────────────────── */

/* Recording State */
.sidebar-voice.recording,
.voice-pill-mobile.recording {
    border-color: #ef4444;
}

.sidebar-voice.recording .sv-icon {
    background: #ef4444;
    animation: voice-pulse-red 1.5s ease-in-out infinite;
}

.sidebar-voice.recording .sv-bar {
    animation: voice-bar-grow 0.8s ease-in-out infinite alternate;
}

.sidebar-voice.recording .sv-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.sidebar-voice.recording .sv-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.sidebar-voice.recording .sv-bar:nth-child(4) {
    animation-delay: 0.1s;
}

.sidebar-voice.recording .sv-bar:nth-child(5) {
    animation-delay: 0s;
}

/* Processing State */
.sv-spinner {
    position: absolute;
    right: 12px;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    display: none;
    animation: voice-spin 0.6s linear infinite;
}

.sidebar-voice.processing .sv-spinner {
    display: block;
}

.sidebar-voice.processing .sv-bars {
    display: none;
}

@keyframes voice-pulse-red {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

@keyframes voice-bar-grow {
    to {
        height: 16px;
    }
}

@keyframes voice-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Modal Redesign ───────────────────────────────────────────── */

.voice-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.voice-modal {
    width: 90%;
    max-width: 440px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    padding: 2.5rem 1.5rem;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translatey(20px);
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.voice-modal-overlay.open .voice-modal {
    transform: scale(1) translatey(0);
}

.voice-modal-header {
    margin-bottom: 2rem;
    text-align: center;
}

.voice-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.voice-modal-title svg {
    width: 20px;
    height: 20px;
    color: #6366f1;
}

.voice-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-modal-close:hover {
    background: var(--border-glass);
    color: var(--text-primary);
}

/* Recording View */
.voice-listening {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.voice-mic-glow {
    width: 80px;
    height: 80px;
    background: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: voice-pulse-blue 2s ease-in-out infinite;
    will-change: transform, box-shadow;
}

.voice-mic-glow svg {
    width: 32px;
    height: 32px;
}

@keyframes voice-pulse-blue {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(99, 102, 241, 0.7);
    }
}

.voice-wave-container {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-wave-canvas {
    width: 100%;
    height: 100%;
}

/* Result View */
.voice-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: result-fade-up 0.5s ease;
}

@keyframes result-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.voice-result-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.is-success .voice-result-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.is-error .voice-result-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.voice-result-icon svg {
    width: 28px;
    height: 28px;
}

.voice-result-text {
    text-align: center;
}

.voice-msg-ar {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-arabic);
    direction: rtl;
}

.voice-msg-fr {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.voice-data-summary {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

.voice-stop-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.voice-stop-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    transform: translateY(-2px);
}

.voice-stop-btn svg {
    width: 16px;
    height: 16px;
}

.voice-dismiss-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, #6366f1, #2563eb);
    width: 100%;
    border-radius: 0 0 28px 28px;
    transform-origin: left;
}
/* ═══════════════════════════════════════════════════════════════
   CUSTOM ADDITIONS — ManageMax UI Enhancements
   ═══════════════════════════════════════════════════════════════ */

/* ── Finance: Profit stat colors ─────────────────────────────── */
.stat-profit-positive {
  color: #10b981;
  font-weight: 800;
  font-size: 1.4rem;
}
.stat-profit-negative {
  color: #ef4444;
  font-weight: 800;
  font-size: 1.4rem;
}

/* ── Icon-only action buttons ────────────────────────────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px; /* Squarer look for professional feel */
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  flex-shrink: 0;
  text-decoration: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  overflow: hidden;
}
.icon-btn:active {
  transform: scale(0.9) !important;
  box-shadow: none !important;
}
.icon-btn svg {
  pointer-events: none;
}

/* Edit — blue */
.icon-btn--edit {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.1);
}
.icon-btn--edit:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Delete — red */
.icon-btn--delete {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.1);
}
.icon-btn--delete:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* WhatsApp — green */
.icon-btn--whatsapp {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}
.icon-btn--whatsapp:hover {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.25);
}

/* View / Image — blue (unified) */
.icon-btn--view {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.15);
}
.icon-btn--view:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2);
}

/* Image / Picture — yellow */
.icon-btn--image {
  color: #eab308;
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.15);
}
.icon-btn--image:hover {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.25);
  box-shadow: 0 2px 12px rgba(234, 179, 8, 0.2);
}

/* Restore / Undo — grey bg, black icon */
.icon-btn--restore {
  color: #000;
  background: rgba(128, 128, 128, 0.25);
  border-color: rgba(128, 128, 128, 0.35);
}
.icon-btn--restore:hover {
  background: rgba(128, 128, 128, 0.35);
  border-color: rgba(128, 128, 128, 0.45);
}

/* Mark paid — emerald */
.icon-btn--paid {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}
.icon-btn--paid:hover {
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.25);
}

/* Undo/reset — slate */
.icon-btn--undo {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
}
.icon-btn--undo:hover {
  background: rgba(148, 163, 184, 0.15);
}

/* Clock / time edit — purple */
.icon-btn--clock {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
}
.icon-btn--clock:hover {
  background: rgba(167, 139, 250, 0.2);
  box-shadow: 0 2px 12px rgba(167, 139, 250, 0.25);
}

.action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

/* ── File upload zone ──────────────────────────────────────────── */
.file-upload-zone {
  border: 2px dashed rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-height: 108px;
  background: rgba(255,255,255,0.02);
  text-align: center;
  gap: 0;
}
.file-upload-zone:hover,
.file-upload-zone.drag-over {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.04);
}
.upload-preview-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.upload-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  margin-bottom: 0.2rem;
}
.upload-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.upload-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.65;
  letter-spacing: 0.04em;
}
.file-upload-zone img.file-preview-img {
  max-height: 120px;
  max-width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ── Custom delete confirmation modal ────────────────────────── */
#deleteConfirmModal .modal {
  max-width: 380px;
  text-align: center;
  padding: 2.5rem 2rem;
}
.delete-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #ef4444;
}


/* ── Forgot clock-out banner ─────────────────────────────────── */
.forgot-clockout-banner {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid #f59e0b;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.05);
}
[dir="rtl"] .forgot-clockout-banner {
  border-left: none;
  border-right: 3px solid #f59e0b;
}
.forgot-clockout-banner .forgot-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 0.25rem;
}
.forgot-clockout-banner .forgot-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Carry-over salary warning ───────────────────────────────── */
.carry-over-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}
.carry-over-banner strong {
  color: #ef4444;
}

/* ── Username suggestion hint ────────────────────────────────── */
.input-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
  opacity: 0.8;
}

/* ── HR Dashboard mobile alignment ──────────────────────────── */
@media (max-width: 600px) {
  .preview-stats-row {
    gap: 0.5rem !important;
    padding-bottom: 1.25rem !important;
  }
  .preview-stat {
    align-items: center;
  }
  .preview-stat-val {
    font-size: 1.15rem !important;
  }
  .preview-stat-key {
    font-size: 0.62rem !important;
    white-space: nowrap;
    text-align: center;
  }
  .preview-stat-divider {
    height: 40px !important;
  }
}

/* ── Maxxy voice badge ───────────────────────────────────────── */
.voice-name-badge {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #2563eb, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

/* ── Real-time search spinner ────────────────────────────────── */
.search-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* ── Voice confirmation UI ── */
.voice-review {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0;
    width: 100%;
}

.voice-review-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.voice-review-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem;
    width: 100%;
    font-size: 1.05rem;
    color: var(--text-primary);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.voice-review-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.voice-review-list li {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.voice-review-list li:last-child {
    border-bottom: none;
}

.voice-review-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.voice-btn {
    flex: 1;
    padding: 0.85rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
}

.voice-btn--confirm {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.voice-btn--confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    filter: brightness(1.1);
}

.voice-btn--cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.voice-btn--cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.voice-processing-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    padding: 2rem;
}

.voice-processing-mini .sv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: sv-spin 1s linear infinite;
    display: block;
}

@keyframes sv-spin {
    to { transform: rotate(360deg); }
}
/* ── Image Preview Modal ────────────────────────────────────────── */
.image-modal-container {
    max-width: 95vw;
    max-height: 95vh;
    padding: 8px;
    position: relative;
    width: fit-content;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: calc(95vh - 16px);
    border-radius: 12px;
    display: block;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .image-modal-container {
        width: 98vw;
        padding: 4px;
    }
    .image-modal-img {
        max-height: calc(98vh - 8px);
        border-radius: 8px;
    }
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-modal-download {
    position: absolute;
    top: 15px;
    right: 65px; /* Positioned to the left of the close button */
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.image-modal-download:hover {
    background: rgba(59, 130, 246, 0.6);
    color: white;
    transform: translateY(-2px);
}
