/* =========================================================================
   ORJICLOUD ADMIN & ORDER MANAGEMENT STYLES
   Administration, Orders, Workflows, Devices & Diagnostics
   ========================================================================= */

/* --- admin.css --- */
/* ================================================================
   Admin Panel - Modern Dual-Theme (Dark / Light) Stylesheet
   ================================================================ */

/* ===== CSS Variables - Dark Theme (Default) ===== */
:root,
html:not([data-theme="light"]),
[data-theme="dark"] {
    --admin-bg: #090e17;
    --admin-bg-secondary: #111a2c;
    --admin-bg-tertiary: #18233a;
    --admin-bg-card: rgba(17, 26, 44, 0.95);
    --admin-bg-input: #0c1422;
    --admin-border: rgba(255, 255, 255, 0.08);
    --admin-border-light: rgba(255, 255, 255, 0.04);
    --admin-text-primary: #f8fafc;
    --admin-text-secondary: #cbd5e1;
    --admin-text-muted: #8493a8;
    --admin-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
    --admin-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --admin-shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.55);
    --admin-table-hover: rgba(255, 255, 255, 0.035);
    --admin-accent-blue: #3b82f6;
    --admin-accent-purple: #8b5cf6;
    --admin-accent-green: #10b981;
    --admin-accent-red: #ef4444;
    --admin-accent-orange: #f59e0b;
    --admin-accent-cyan: #06b6d4;
    --admin-accent-yellow: #eab308;
    --admin-code-bg: #080d15;
    --admin-code-text: #e2e8f0;
}

/* ===== CSS Variables - Light Theme ===== */
html[data-theme="light"] {
    --admin-bg: #f8fafc;
    --admin-bg-secondary: #ffffff;
    --admin-bg-tertiary: #f1f5f9;
    --admin-bg-card: #ffffff;
    --admin-bg-input: #ffffff;
    --admin-border: #e2e8f0;
    --admin-border-light: #f1f5f9;
    --admin-text-primary: #0f172a;
    --admin-text-secondary: #334155;
    --admin-text-muted: #64748b;
    --admin-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --admin-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    --admin-shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08);
    --admin-table-hover: rgba(241, 245, 249, 0.8);
    --admin-accent-blue: #2563eb;
    --admin-accent-purple: #7c3aed;
    --admin-accent-green: #059669;
    --admin-accent-red: #dc2626;
    --admin-accent-orange: #d97706;
    --admin-accent-cyan: #0891b2;
    --admin-accent-yellow: #ca8a04;
    --admin-code-bg: #f8fafc;
    --admin-code-text: #0f172a;
}

/* ===== Base Admin Layout ===== */
.admin-page {
    background: var(--admin-bg) !important;
    min-height: 100vh;
    color: var(--admin-text-primary) !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ===== Typography & Contrast Helper ===== */
.admin-page .text-muted,
.modal .text-muted {
    color: var(--admin-text-muted) !important;
}

.admin-text-main {
    color: var(--admin-text-primary) !important;
    font-weight: 600;
}

.admin-text-sub {
    color: var(--admin-text-muted) !important;
}

.admin-empty-state {
    color: var(--admin-text-secondary) !important;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== Admin Header ===== */
.admin-header {
    background: var(--admin-bg-secondary);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.admin-logo img {
    height: 2.25rem;
    width: auto;
}

.admin-logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--admin-text-primary);
    letter-spacing: -0.3px;
}

/* ===== Admin Content ===== */
.admin-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}

/* ===== Stat Cards ===== */
.admin-stat-card {
    background: var(--admin-bg-secondary);
    border: 1px solid var(--admin-border);
    border-radius: 18px;
    padding: 1.35rem 1.5rem;
    box-shadow: var(--admin-shadow);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-stat-card:hover {
    box-shadow: var(--admin-shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.35);
}

.admin-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--admin-text-primary);
    line-height: 1.1;
}

.admin-stat-value.blue { color: #3b82f6; }
.admin-stat-value.purple { color: #a855f7; }
.admin-stat-value.orange { color: #f59e0b; }
.admin-stat-value.green { color: #10b981; }

.admin-stat-description {
    font-size: 0.8rem;
    color: var(--admin-text-secondary);
    margin-top: 0.4rem;
}

.admin-stat-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.75rem;
    opacity: 0.08;
    pointer-events: none;
}

/* ===== Navigation Tabs (Modern Segmented Bar) ===== */
.admin-nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    background: var(--admin-bg-secondary);
    border: 1px solid var(--admin-border);
    padding: 0.3rem;
    border-radius: 16px;
    box-shadow: var(--admin-shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.admin-nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.admin-nav-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.admin-nav-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.admin-nav-tab {
    background: transparent !important;
    border: 1px solid transparent !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--admin-text-secondary) !important;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    flex-shrink: 0;
}

.admin-nav-tab:hover {
    color: var(--admin-text-primary) !important;
    background: var(--admin-bg-tertiary) !important;
}

.admin-nav-tab.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35) !important;
}

.admin-nav-tab.active i {
    color: #ffffff !important;
}

/* ===== Admin Sub-Navigation Pills (Segmented Control) ===== */
.admin-subnav-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--admin-bg-tertiary);
    border: 1px solid var(--admin-border);
    padding: 0.3rem;
    border-radius: 14px;
}

.admin-subnav-pill {
    background: transparent !important;
    border: 1px solid transparent !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--admin-text-secondary) !important;
    padding: 0.45rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.825rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    gap: 0.4rem;
}

.admin-subnav-pill:hover {
    color: var(--admin-text-primary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="light"] .admin-subnav-pill:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.admin-subnav-pill.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4) !important;
}

.admin-subnav-pill.active i {
    color: #ffffff !important;
}

/* ===== Admin Panel Card ===== */
.admin-panel {
    background: var(--admin-bg-secondary);
    border: 1px solid var(--admin-border);
    border-radius: 20px;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    color: var(--admin-text-primary);
}

.admin-panel-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--admin-bg-secondary);
}

.admin-panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.admin-panel-body {
    padding: 1.5rem;
    color: var(--admin-text-primary);
}

/* ===== Admin Sub-Cards (Inner widgets) ===== */
.admin-sub-card {
    background: var(--admin-bg-tertiary);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 1.25rem;
    color: var(--admin-text-primary);
}

.admin-sub-card-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Form Controls & Inputs ===== */
.admin-input,
.admin-page .form-control,
.admin-page .form-select,
.modal .form-control,
.modal .form-select {
    background-color: var(--admin-bg-input) !important;
    border: 1px solid var(--admin-border) !important;
    color: var(--admin-text-primary) !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    padding: 0.55rem 0.85rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.admin-input:focus,
.admin-page .form-control:focus,
.admin-page .form-select:focus,
.modal .form-control:focus,
.modal .form-select:focus {
    background-color: var(--admin-bg-input) !important;
    border-color: #6366f1 !important;
    color: var(--admin-text-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    outline: none !important;
}

.admin-input::placeholder,
.admin-page .form-control::placeholder,
.modal .form-control::placeholder {
    color: var(--admin-text-muted) !important;
}

.admin-input:read-only,
.admin-page .form-control:read-only,
.modal .form-control:read-only {
    background-color: var(--admin-bg-tertiary) !important;
    color: var(--admin-text-secondary) !important;
}

.admin-page .input-group-text,
.modal .input-group-text {
    background-color: var(--admin-bg-tertiary) !important;
    border: 1px solid var(--admin-border) !important;
    color: var(--admin-text-muted) !important;
    border-radius: 10px 0 0 10px !important;
}

.modal .form-label,
.admin-page .form-label {
    color: var(--admin-text-muted) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0.4rem !important;
}

.modal .form-check-label,
.admin-page .form-check-label {
    color: var(--admin-text-primary) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    cursor: pointer;
}

.modal .form-check-input:not([type="checkbox"].form-switch *),
.admin-page .form-check-input:not(.form-switch *) {
    background-color: var(--admin-bg-tertiary) !important;
    border-color: var(--admin-border) !important;
    cursor: pointer;
}

.modal .form-check-input:not(.form-switch *):checked,
.admin-page .form-check-input:not(.form-switch *):checked {
    background-color: var(--admin-accent-blue) !important;
    border-color: var(--admin-accent-blue) !important;
}

/* ===== Modern High-Contrast Toggle Switch (iOS/Material Style) ===== */
.admin-page .form-switch,
.modal .form-switch {
    display: inline-flex !important;
    align-items: center !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.admin-page .form-switch .form-check-input,
.modal .form-switch .form-check-input {
    width: 3.2rem !important;
    height: 1.8rem !important;
    margin-left: 0 !important;
    background-color: #1e293b !important;
    border: 2px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 2rem !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%2394a3b8'/%3e%3c/svg%3e") !important;
    background-position: left 2px center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    transition: background-position 0.22s ease-in-out, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35) !important;
    flex-shrink: 0;
}

.admin-page .form-switch .form-check-input:hover,
.modal .form-switch .form-check-input:hover {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
}

.admin-page .form-switch .form-check-input:checked,
.modal .form-switch .form-check-input:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    background-position: right 2px center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.55), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.admin-page .form-switch .form-check-input:focus,
.modal .form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3) !important;
    outline: none !important;
}

/* Light Theme Switch Overrides */
html[data-theme="light"] .admin-page .form-switch .form-check-input,
html[data-theme="light"] .modal .form-switch .form-check-input {
    background-color: #cbd5e1 !important;
    border-color: #94a3b8 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] .admin-page .form-switch .form-check-input:checked,
html[data-theme="light"] .modal .form-switch .form-check-input:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.35) !important;
}

/* ===== Admin Table ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    color: var(--admin-text-primary);
}

.admin-table thead th {
    background: var(--admin-bg-tertiary);
    padding: 0.9rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
    border-top: none;
}

.admin-table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--admin-border-light);
    color: var(--admin-text-primary);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover {
    background: var(--admin-table-hover);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Plan Badges ===== */
.admin-plan-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.admin-plan-pill.free { background: rgba(148,163,184,.14); color: #64748b; border: 1px solid rgba(148,163,184,.25); }
.admin-plan-pill.pro { background: rgba(99,102,241,.15); color: #6366f1; border: 1px solid rgba(99,102,241,.3); }
.admin-plan-pill.family { background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.admin-plan-pill.enterprise { background: rgba(168,85,247,.15); color: #a855f7; border: 1px solid rgba(168,85,247,.3); }

html:not([data-theme="light"]) .admin-plan-pill.free,
[data-theme="dark"] .admin-plan-pill.free { color: #94a3b8; }
html:not([data-theme="light"]) .admin-plan-pill.pro,
[data-theme="dark"] .admin-plan-pill.pro { color: #818cf8; }
html:not([data-theme="light"]) .admin-plan-pill.family,
[data-theme="dark"] .admin-plan-pill.family { color: #34d399; }
html:not([data-theme="light"]) .admin-plan-pill.enterprise,
[data-theme="dark"] .admin-plan-pill.enterprise { color: #c084fc; }

/* ===== Action Icon Buttons ===== */
.admin-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-tertiary);
    color: var(--admin-text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
}

.admin-action-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
}

.admin-action-btn.danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.admin-action-btn.warning:hover {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
}

.admin-action-btn.success:hover {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* ===== Admin Buttons & Outlines ===== */
.admin-btn-primary,
.admin-page .btn-primary,
.modal .btn-primary {
    background: #3b82f6 !important;
    border: 1px solid #2563eb !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.2s ease !important;
}

.admin-btn-primary:hover,
.admin-page .btn-primary:hover,
.modal .btn-primary:hover {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 16px rgba(59, 130, 246, 0.45) !important;
    color: #ffffff !important;
}

.admin-page .btn-outline-primary,
.modal .btn-outline-primary {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    color: var(--admin-accent-blue) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.admin-page .btn-outline-primary:hover,
.modal .btn-outline-primary:hover {
    background: var(--admin-accent-blue) !important;
    border-color: var(--admin-accent-blue) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.admin-btn-secondary,
.admin-page .btn-outline-secondary,
.modal .btn-outline-secondary {
    background: var(--admin-bg-tertiary) !important;
    border: 1px solid var(--admin-border) !important;
    color: var(--admin-text-secondary) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.admin-btn-secondary:hover,
.admin-page .btn-outline-secondary:hover,
.modal .btn-outline-secondary:hover {
    background: var(--admin-border) !important;
    color: var(--admin-text-primary) !important;
    transform: translateY(-1px) !important;
}

.admin-page .btn-outline-warning,
.modal .btn-outline-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: var(--admin-accent-orange) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.admin-page .btn-outline-warning:hover,
.modal .btn-outline-warning:hover {
    background: var(--admin-accent-orange) !important;
    border-color: var(--admin-accent-orange) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.admin-page .btn-outline-success,
.modal .btn-outline-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: var(--admin-accent-green) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.admin-page .btn-outline-success:hover,
.modal .btn-outline-success:hover {
    background: var(--admin-accent-green) !important;
    border-color: var(--admin-accent-green) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.admin-page .btn-outline-danger,
.modal .btn-outline-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    color: var(--admin-accent-red) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.admin-page .btn-outline-danger:hover,
.modal .btn-outline-danger:hover {
    background: var(--admin-accent-red) !important;
    border-color: var(--admin-accent-red) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* ===== Universal Modal Theming ===== */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
}

.modal-content,
.admin-page .modal-content {
    background: var(--admin-bg-secondary) !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
    color: var(--admin-text-primary) !important;
    overflow: hidden;
}

.modal-header,
.admin-page .modal-header {
    background: var(--admin-bg-tertiary) !important;
    border-bottom: 1px solid var(--admin-border) !important;
    padding: 1.25rem 1.75rem !important;
}

.modal-title,
.admin-page .modal-title {
    color: var(--admin-text-primary) !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
}

.modal-body,
.admin-page .modal-body {
    padding: 1.75rem !important;
    background: var(--admin-bg-secondary) !important;
    color: var(--admin-text-primary) !important;
}

.modal-footer,
.admin-page .modal-footer {
    background: var(--admin-bg-tertiary) !important;
    border-top: 1px solid var(--admin-border) !important;
    padding: 1rem 1.75rem !important;
}

html[data-theme="light"] .btn-close {
    filter: none;
    opacity: 0.6;
}

html:not([data-theme="light"]) .btn-close,
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

/* ===== Code Block / Log Viewer ===== */
.admin-code-block {
    background: var(--admin-code-bg);
    color: var(--admin-code-text);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
}

/* ===== Avatars ===== */
.admin-avatar-initials {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ===== Responsive Utilities ===== */
@media (max-width: 960px) {
    .admin-content {
        padding: 1rem;
    }
    .admin-panel-header {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.65rem;
    }
}

/* ===== Admin Recipient Picker & Custom Dropdown ===== */
.admin-recipient-picker-wrapper {
    position: relative;
    width: 100%;
}

.admin-recipient-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.85rem;
    background: var(--admin-bg-tertiary);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-align: left;
}

.admin-recipient-trigger:hover,
.admin-recipient-trigger:focus {
    border-color: #3b82f6;
    background: var(--admin-bg-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.admin-recipient-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--admin-bg-secondary);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: adminDropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminDropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-recipient-header {
    padding: 0.45rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-text-muted);
    background: var(--admin-bg-tertiary);
    border-bottom: 1px solid var(--admin-border-light);
    border-top: 1px solid var(--admin-border-light);
}

.admin-recipient-header:first-child {
    border-top: none;
}

.admin-recipient-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--admin-border-light);
    color: var(--admin-text-primary);
    font-size: 0.85rem;
}

.admin-recipient-item:last-child {
    border-bottom: none;
}

.admin-recipient-item:hover,
.admin-recipient-item.active {
    background: var(--admin-table-hover);
}

.admin-recipient-item.active {
    border-left: 3px solid #3b82f6;
}

.admin-recipient-search-box {
    padding: 0.5rem 0.85rem;
    background: var(--admin-bg-tertiary);
    border-bottom: 1px solid var(--admin-border);
}

.admin-recipient-search-input {
    width: 100%;
    background: var(--admin-bg-primary);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    color: var(--admin-text-primary);
    outline: none;
}

.admin-recipient-search-input:focus {
    border-color: #3b82f6;
}

.admin-recipient-user-list {
    max-height: 210px;
    overflow-y: auto;
}

/* ===== Diagnostics & Health Monitor Styles ===== */
.diag-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--admin-text-primary) !important;
}

.diag-table thead th {
    background: var(--admin-bg-tertiary) !important;
    color: var(--admin-text-muted) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid var(--admin-border) !important;
    border-top: none !important;
    padding: 0.85rem 1.15rem !important;
}

.diag-table tbody td {
    padding: 0.9rem 1.15rem !important;
    border-bottom: 1px solid var(--admin-border-light) !important;
    color: var(--admin-text-primary) !important;
    background: transparent !important;
    vertical-align: middle !important;
}

.diag-table tbody tr {
    transition: background-color 0.15s ease;
}

.diag-table tbody tr:hover {
    background: var(--admin-table-hover) !important;
}

.diag-table tbody tr:last-child td {
    border-bottom: none !important;
}

.diag-path-code {
    background: rgba(14, 165, 233, 0.1) !important;
    color: #38bdf8 !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 7px !important;
    font-family: 'JetBrains Mono', Consolas, monospace !important;
    font-size: 0.8rem !important;
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    display: inline-block;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

html[data-theme="light"] .diag-path-code {
    background: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}

.diag-badge-success {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.35) !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

html[data-theme="light"] .diag-badge-success {
    background: rgba(5, 150, 105, 0.12) !important;
    color: #059669 !important;
    border-color: rgba(5, 150, 105, 0.3) !important;
}

.diag-badge-danger {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.35) !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

html[data-theme="light"] .diag-badge-danger {
    background: rgba(220, 38, 38, 0.12) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
}

.diag-badge-warning {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.35) !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

html[data-theme="light"] .diag-badge-warning {
    background: rgba(217, 119, 6, 0.12) !important;
    color: #d97706 !important;
    border-color: rgba(217, 119, 6, 0.3) !important;
}

.diag-badge-info {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(96, 165, 250, 0.35) !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

html[data-theme="light"] .diag-badge-info {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
}

.diag-status-pill {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 99px !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.diag-status-pill.healthy {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

.diag-status-pill.degraded {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3) !important;
}

.diag-status-pill.unhealthy {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3) !important;
}

.diag-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.diag-icon-box.healthy {
    background: rgba(16, 185, 129, 0.18) !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
}

.diag-icon-box.degraded {
    background: rgba(245, 158, 11, 0.18) !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
    color: #fbbf24 !important;
}

.diag-icon-box.unhealthy {
    background: rgba(239, 68, 68, 0.18) !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
    color: #f87171 !important;
}


/* --- admin-projects.css --- */
/* Extracted styles from AdminProjects.cshtml */

/* ================================================================
   ADMIN PROJECTS PAGE - LIGHT GLASSMORPHISM DESIGN
   ================================================================ */

.admin-projects-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #f8fafc 100%);
    min-height: 100vh;
    color: #1e293b;
}

/* Custom select component styles */
.custom-select { display: inline-block; }
.custom-select .custom-select-button { cursor: pointer; border-radius: 10px; padding: .5rem .75rem; background: rgba(255,255,255,0.9); border: 1px solid rgba(59,130,246,0.08); width:100%; text-align:left; }
.custom-select .custom-select-button:focus { outline: none; box-shadow: 0 0 0 4px rgba(59,130,246,0.06); }
.custom-select-menu { max-height: 220px; overflow:auto; border:1px solid rgba(0,0,0,0.06); }
.custom-select-menu li { display:flex; align-items:center; gap:0.5rem; border-radius:6px; }
.custom-select-menu li:hover, .custom-select-menu li:focus { background: rgba(59,130,246,0.06); outline: none; cursor: pointer; }
.custom-select-menu li i { width: 18px; text-align:center; }

/* Ensure custom select button is clickable above other elements */
.custom-select-button { position: relative; z-index: 3102; pointer-events: auto; }
.custom-impl-select { z-index: 3102; }
.impl-substep-item { overflow: visible; }

/* Ensure the small caret icon stays visible above the floating menu to avoid
   the appearance of overlapping boxes when the menu is rendered in document.body */
.custom-select .select-caret,
.custom-impl-select .select-caret {
    position: relative;
    z-index: 3101;
    pointer-events: none;
}

/* small adjustments for implementation selects */
.custom-impl-select .custom-select-button { padding: .35rem .6rem; }
.custom-impl-select .select-label { font-weight:600; }

/* Remove bootstrap native form-select background caret for our custom selects
   to avoid showing two carets (bootstrap + custom) */
.custom-select .custom-select-button,
.custom-impl-select .custom-select-button {
    --bs-form-select-bg-img: none !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    width: 180px;
}

/* Custom select component styles */
.custom-select { display: inline-block; }
.custom-select .custom-select-button { cursor: pointer; border-radius: 10px; padding: .5rem .75rem; background: rgba(255,255,255,0.9); border: 1px solid rgba(59,130,246,0.08); width:100%; text-align:left; }
.custom-select .custom-select-button:focus { outline: none; box-shadow: 0 0 0 4px rgba(59,130,246,0.06); }
.custom-select-menu { max-height: 220px; overflow:auto; border:1px solid rgba(0,0,0,0.06); }
.custom-select-menu li { display:flex; align-items:center; gap:0.5rem; border-radius:6px; }
.custom-select-menu li:hover, .custom-select-menu li:focus { background: rgba(59,130,246,0.06); outline: none; cursor: pointer; }
.custom-select-menu li i { width: 18px; text-align:center; }

/* small adjustments for implementation selects */
.custom-impl-select .custom-select-button { padding: .35rem .6rem; }
.custom-impl-select .select-label { font-weight:600; }

/* Quote conversation avatars in admin details */
.quote-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#eef2fb,#e6eefb);
    color: #1e3a8a;
    font-weight: 700;
    margin: 0 10px;
    flex-shrink: 0;
}
.quote-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: transparent;
}
.quote-avatar.has-image {
    background: transparent;
}

.quote-comm-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}
.quote-comm-wrapper.sent {
    justify-content: flex-end;
}
.quote-comm-wrapper.received {
    justify-content: flex-start;
}
.quote-bubble {
    max-width: 75%;
    padding: 0.8rem 1rem;
    position: relative;
}

/* ===== Header Section ===== */
.admin-projects-header {
    animation: slideDownFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
    from { 
        opacity: 0; 
        transform: translateY(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.admin-header-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 10px 40px rgba(59, 130, 246, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-header-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 60px rgba(59, 130, 246, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.admin-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-header-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 15px 35px rgba(59, 130, 246, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.08);
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.admin-header-icon {
    font-size: 2.5rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Sidebar workflow state styles */
.project-details-sidebar.locked {
    opacity: 0.7;
}
.project-details-sidebar [data-workflow-region="implementation"].locked {
    pointer-events: none;
    opacity: 0.45;
}
.project-details-sidebar [data-workflow-group].locked {
    pointer-events: none;
    opacity: 0.45;
}
.project-details-sidebar .locked .check-icon { display: none !important; }

/* Semantic state styles */
.project-details-sidebar [data-workflow-group].current {
    border-left: 3px solid var(--bs-primary, #0d6efd);
    padding-left: .5rem;
    background: rgba(13,110,253,0.02);
}
.project-details-sidebar [data-workflow-group].completed {
    border-left: 3px solid #16a34a; /* green */
    padding-left: .5rem;
    background: rgba(22,163,74,0.03);
}
.project-details-sidebar [data-workflow-group].locked {
    filter: grayscale(30%);
}

.project-details-sidebar [data-workflow-region="implementation"].current {
    border-left: 3px solid var(--bs-primary, #0d6efd);
}
.project-details-sidebar [data-workflow-region="implementation"].completed {
    border-left: 3px solid #16a34a;
}

/* Accessibility: indicate disabled controls clearly */
.project-details-sidebar [aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.55;
}

/* Animated state transitions and prominent current highlight */
.project-details-sidebar [data-workflow-group],
.project-details-sidebar [data-workflow-region="implementation"] {
    transition: background-color 300ms ease, border-left-color 350ms ease, box-shadow 350ms ease, opacity 300ms ease, transform 300ms ease;
    will-change: background-color, box-shadow, transform;
    position: relative;
}

.project-details-sidebar [data-workflow-group].current::before,
.project-details-sidebar [data-workflow-region="implementation"].current::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    bottom: 6px;
    width: 6px;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(13,110,253,0.18), rgba(13,110,253,0.06));
    box-shadow: 0 6px 20px rgba(13,110,253,0.12);
    opacity: 0.0;
    animation: highlight-enter 900ms ease forwards;
}

@keyframes highlight-enter {
    0% { opacity: 0; transform: scaleY(0.95); }
    40% { opacity: 1; transform: scaleY(1.02); }
    100% { opacity: 1; transform: scaleY(1); }
}

/* gentle pulse for current state */
@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 rgba(13,110,253,0); }
    50% { box-shadow: 0 8px 30px rgba(13,110,253,0.08); }
    100% { box-shadow: 0 0 0 rgba(13,110,253,0); }
}
.project-details-sidebar [data-workflow-group].current,
.project-details-sidebar [data-workflow-region="implementation"].current {
    animation: highlight-pulse 2.4s ease-in-out infinite;
}

/* Overdue badge in project list */
.overdue-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 0.85rem;
}

/* completed check pop animation */
@keyframes check-pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.project-details-sidebar [data-workflow-group].completed .check-icon,
.project-details-sidebar [data-workflow-region="implementation"].completed .check-icon {
    animation: check-pop 420ms cubic-bezier(0.2,1,0.22,1) 1;
    color: #16a34a !important;
}

/* subtle hover for interactive unlocked groups */
.project-details-sidebar [data-workflow-group]:not(.locked):hover,
.project-details-sidebar [data-workflow-region="implementation"]:not(.locked):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16,24,40,0.04);
}

/* focus styles for keyboard navigation */
.project-details-sidebar [data-workflow-group]:focus-within,
.project-details-sidebar [data-workflow-region="implementation"]:focus-within {
    outline: 3px solid rgba(59,130,246,0.12);
    outline-offset: 2px;
}

.admin-header-text {
    flex: 1;
}

.admin-projects-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-projects-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-projects-subtitle i {
    color: #3b82f6;
    font-size: 0.9rem;
}

.admin-header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.stat-card > i {
    font-size: 2rem;
    color: #3b82f6;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* ===== Controls Section ===== */
.admin-projects-controls {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
}

.controls-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 
        0 10px 40px rgba(59, 130, 246, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.controls-card:hover {
    box-shadow: 
        0 15px 50px rgba(59, 130, 246, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.controls-wrapper {
    display: grid;
    grid-template-columns: 2fr 1.5fr auto;
    gap: 2rem;
    align-items: end;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.control-label i {
    color: #3b82f6;
    font-size: 0.85rem;
}

.search-group,
.filter-group,
.actions-group {
    position: relative;
}

.search-input-wrapper,
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.select-prefix-icon {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.admin-projects-search {
    padding-left: 3rem !important;
}

.admin-projects-select {
    padding-left: 3rem !important;
}

.admin-projects-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    position: relative;
}

.admin-projects-input:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.admin-projects-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.12),
        0 8px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.admin-projects-input:focus ~ .input-focus-border {
    opacity: 1;
    transform: scaleX(1);
}

.admin-projects-input:focus ~ .search-icon,
.admin-projects-input:focus ~ .select-prefix-icon {
    color: #3b82f6;
    transform: scale(1.1);
}

.input-focus-border {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    transform: scaleX(0.8);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.admin-projects-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.admin-projects-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
    padding-right: 3rem;
    cursor: pointer;
}

.admin-projects-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.admin-projects-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.admin-projects-btn:hover::before {
    width: 300px;
    height: 300px;
}

.admin-projects-btn > * {
    position: relative;
    z-index: 1;
}

.admin-projects-btn-reload {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 
        0 10px 30px rgba(59, 130, 246, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-projects-btn-reload:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(59, 130, 246, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

.admin-projects-btn-reload:active {
    transform: translateY(-1px);
}

.admin-projects-btn-reload i {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-projects-btn-reload:hover i {
    transform: rotate(180deg);
}

/* ===== Projects Table Card ===== */
.admin-projects-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    box-shadow: 
        0 10px 40px rgba(59, 130, 246, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    overflow: hidden;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

.admin-projects-table-container {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) rgba(59, 130, 246, 0.1);
}

.admin-projects-table-container::-webkit-scrollbar {
    height: 8px;
}

.admin-projects-table-container::-webkit-scrollbar-track {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
}

.admin-projects-table-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

.admin-projects-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

.admin-projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
}

.admin-projects-table thead {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom: 2px solid rgba(59, 130, 246, 0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-projects-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.admin-projects-table th:first-child {
    padding-left: 1.5rem;
    border-radius: 18px 0 0 0;
}

.admin-projects-table th:last-child {
    padding-right: 1.5rem;
    border-radius: 0 18px 0 0;
}

.admin-projects-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    color: #1e293b;
    vertical-align: middle;
    transition: all 0.3s ease;
    overflow: hidden;
}

.admin-projects-table td:first-child {
    padding-left: 1.5rem;
}

.admin-projects-table td:last-child {
    padding-right: 1.5rem;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.admin-projects-table tbody tr.project-row {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.admin-projects-table tbody tr.project-row td:first-child {
    position: relative;
}

.admin-projects-table tbody tr.project-row td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-projects-table tbody tr.project-row:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.admin-projects-table tbody tr.project-row:hover td:first-child::before {
    opacity: 1;
}

.admin-projects-table tbody tr.project-row.expanded {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
}

.admin-projects-table tbody tr.project-row.expanded td:first-child::before {
    opacity: 1;
}

.expand-icon {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #94a3b8;
    font-size: 0.85rem;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
}

.project-row:hover .expand-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.project-row.expanded .expand-icon {
    transform: rotate(90deg);
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.project-cell-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-cell-description {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-cell-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.project-cell-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.project-cell-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.project-cell-user-avatar .avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.project-cell-user-info {
    display: flex;
    flex-direction: column;
}

.project-cell-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #0f172a;
}

.project-cell-user-email {
    font-size: 0.75rem;
    color: #94a3b8;
}

.project-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.project-type-badge.website {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.project-type-badge.website i {
    color: #3b82f6;
}

.project-type-badge.hardware {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    color: #6b21a8;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.project-type-badge.hardware i {
    color: #8b5cf6;
}

.project-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.project-status-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: currentColor;
}

.project-status-badge.draft {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15) 0%, rgba(107, 114, 128, 0.15) 100%);
    color: #374151;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.project-status-badge.draft i {
    color: #6b7280;
}

.project-status-badge.pending {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    color: #92400e;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.project-status-badge.pending i {
    color: #f59e0b;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.project-status-badge.in-review,
.project-status-badge.in-bearbeitung {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.project-status-badge.in-review i,
.project-status-badge.in-bearbeitung i {
    color: #3b82f6;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-status-badge.accepted,
.project-status-badge.angenommen {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-status-badge.accepted i,
.project-status-badge.angenommen i {
    color: #10b981;
}

.project-status-badge.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(67, 56, 202, 0.15) 100%);
    color: #3730a3;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.project-status-badge.active i {
    color: #4f46e5;
}

.project-status-badge.completed {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.15) 100%);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.project-status-badge.completed i {
    color: #6366f1;
}

.project-status-badge.invoiced {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    color: #6b21a8;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.project-status-badge.invoiced i {
    color: #a855f7;
}

.project-status-badge.abgebrochen {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.12) 100%);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.project-status-badge.abgebrochen i {
    color: #ef4444;
}

.project-status-badge.abgelehnt {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.08) 100%);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.project-status-badge.abgelehnt i {
    color: #dc2626;
}

.project-status-badge.archiviert {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.10) 0%, rgba(107, 114, 128, 0.06) 100%);
    color: #374151;
    border: 1px solid rgba(156, 163, 175, 0.18);
}

.project-status-badge.archiviert i {
    color: #6b7280;
}

.project-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.65rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    color: #1e40af;
}

.project-date-cell {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}

.project-date-cell i {
    color: #94a3b8;
    margin-right: 0.35rem;
}

.loading-row td {
    padding: 3rem 1rem !important;
}

.admin-projects-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* ===== Expandable Details Row ===== */
.project-details-row {
    display: none;
}

.project-details-row.show {
    display: table-row;
}

.project-details-row td {
    padding: 0 !important;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    border-bottom: 3px solid rgba(59, 130, 246, 0.2);
}

.project-details-content {
    padding: 2rem;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-15px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.project-details-columns {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

.project-details-main {
    min-width: 0;
}

.project-details-sidebar {
    align-self: start;
}

/* ===== Detail Cards ===== */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.detail-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.detail-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
}

.detail-info-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-info-card-title i {
    font-size: 0.85rem;
}

.detail-info-card-content {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.4;
}

/* ===== Detail Sections ===== */
.detail-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-section:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(59, 130, 246, 0.15);
}

.detail-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.12);
}

.detail-section-title i {
    font-size: 1.25rem;
    color: #3b82f6;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
}

.detail-subsection {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e40af;
    padding: 0.65rem 1rem;
    margin: 1rem 0 0.75rem 0;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: rgba(59, 130, 246, 0.02);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 8px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item-label {
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-item-label::before {
    content: '•';
    color: #3b82f6;
    font-weight: 900;
    font-size: 1.2rem;
}

.detail-item-value {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.detail-item-value.empty {
    color: #cbd5e1;
    font-style: italic;
    font-weight: 500;
}

.detail-empty-notice {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1.5px solid rgba(251, 191, 36, 0.35);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

.detail-empty-notice i {
    color: #f59e0b;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== Assets Grid ===== */
.assets-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.asset-mini-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    padding: 0.875rem 0.75rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.asset-mini-card:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.asset-mini-card i {
    font-size: 1.75rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    display: block;
    transition: transform 0.3s ease;
}

.asset-mini-card:hover i {
    transform: scale(1.15);
}

.asset-mini-card span {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.document-item {
    background: var(--admin-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.document-item:hover {
    background: var(--admin-bg-tertiary);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

/* Expired documents (old invoices, quotes) */
.document-item.document-expired {
    opacity: 0.5;
    background: rgba(100, 116, 139, 0.05);
    border-color: rgba(100, 116, 139, 0.15);
}

.document-item.document-expired:hover {
    opacity: 0.65;
    background: rgba(100, 116, 139, 0.08);
    transform: translateX(2px);
    box-shadow: none;
}

.document-item.document-expired .document-item-icon {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    box-shadow: none;
}

.document-item.document-expired .document-item-name {
    color: var(--admin-text-muted);
    text-decoration: line-through;
}

.document-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.document-item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.document-item-details {
    flex: 1;
    min-width: 0;
}

.document-item-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--admin-text-primary);
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-item-meta {
    font-size: 0.7rem;
    color: var(--admin-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-item-type {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.document-item-date {
    color: var(--admin-text-muted);
}
 
/* ===== Admin Checklist ===== */
.admin-checklist {
    background: var(--admin-bg-secondary);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 
        0 8px 32px rgba(16, 185, 129, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 1rem;
}

/* Mobile elements hidden by default */
.admin-checklist-mobile-toggle,
.admin-checklist-backdrop {
    display: none;
}

.admin-checklist-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--admin-text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(16, 185, 129, 0.15);
}

.admin-checklist-title i {
    font-size: 1.25rem;
    color: #10b981;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 10px;
}

.admin-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: flex-start;
}
 
.admin-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.admin-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.admin-action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.admin-action-btn > * {
    position: relative;
    z-index: 1;
}

.admin-action-btn i {
    font-size: 1.35rem;
}
 
.admin-action-btn:hover {
    transform: translateY(-3px);
}
 
.admin-action-btn:active {
    transform: translateY(-1px);
}
 
.admin-action-btn.in-review {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    color: #1e40af;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.admin-action-btn.in-review:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(37, 99, 235, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.admin-action-btn.in-review i {
    color: #3b82f6;
}
 
.admin-action-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.35);
}

.admin-action-btn.primary:hover {
    box-shadow: 0 12px 36px rgba(16, 185, 129, 0.45);
    transform: translateY(-4px);
}

.admin-action-btn.primary i {
    color: #ffffff;
}
 
.admin-action-btn.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.12) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: #991b1b;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.admin-action-btn.danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(220, 38, 38, 0.18) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.admin-action-btn.danger i {
    color: #dc2626;
}

.admin-action-message {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 1.25rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-checklist-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-checklist-section-title i {
    color: #10b981;
    font-size: 0.9rem;
}

.admin-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.admin-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
}

.admin-checklist-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.admin-checklist-item.checked {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

.admin-checklist-item.checked:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(5, 150, 105, 0.12) 100%);
    border-color: rgba(16, 185, 129, 0.45);
}

.admin-checklist-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #10b981;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 6px;
    margin-top: 0.125rem;
}

.admin-checklist-item-content {
    flex: 1;
    min-width: 0;
}

.admin-checklist-item-label {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.875rem;
    line-height: 1.4;
}

.admin-checklist-item.checked .admin-checklist-item-label {
    color: #065f46;
}

.admin-checklist-item-date {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-checklist-item-date i {
    font-size: 0.65rem;
}

.admin-checklist-progress {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

.admin-checklist-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-checklist-progress-bar {
    height: 10px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.admin-checklist-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    border-radius: 6px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    position: relative;
}

.admin-checklist-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.admin-checklist-notes {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

.admin-checklist-notes label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-checklist-notes label i {
    color: #3b82f6;
    font-size: 0.9rem;
}

.admin-checklist-notes textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
}

.admin-checklist-notes textarea:hover {
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.admin-checklist-notes textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 16px rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

.admin-checklist-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
    margin-top: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-checklist-save-indicator.show {
    opacity: 1;
    animation: saveIndicatorPulse 0.5s ease;
}

@keyframes saveIndicatorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.admin-checklist-save-indicator i {
    font-size: 0.9rem;
}

/* ===== Files Grid (combined assets with image previews) ===== */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.file-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.file-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.18);
}

/* Image file card */
.file-card-image .file-card-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.file-card-image .file-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-card-image:hover .file-card-preview img {
    transform: scale(1.08);
}

.file-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-card-overlay i {
    font-size: 1.75rem;
    color: #ffffff;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.file-card-image:hover .file-card-overlay {
    opacity: 1;
}

.file-card-image:hover .file-card-overlay i {
    transform: scale(1);
}

/* Non-image file card */
.file-card:not(.file-card-image) {
    flex-direction: row;
    align-items: center;
    padding: 1rem;
    gap: 0.875rem;
}

.file-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.file-card-icon i {
    font-size: 1.35rem;
    color: #ffffff;
}

.file-card-download {
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.file-card-download i {
    font-size: 0.9rem;
    color: #3b82f6;
}

.file-card:not(.file-card-image):hover .file-card-download {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.file-card:not(.file-card-image):hover .file-card-download i {
    color: #ffffff;
}

/* File card info */
.file-card-info {
    padding: 0.875rem;
    flex: 1;
    min-width: 0;
}

.file-card:not(.file-card-image) .file-card-info {
    padding: 0;
}

.file-card-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: #0f172a;
    margin-bottom: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-card-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.file-card-type.logo {
    background: rgba(251, 191, 36, 0.15);
    color: #92400e;
}

.file-card-type.image {
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
}

.file-card-type.document {
    background: rgba(139, 92, 246, 0.12);
    color: #6b21a8;
}

.file-card-size {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .file-card:not(.file-card-image) {
        padding: 0.75rem;
    }
    
    .file-card-icon {
        width: 40px;
        height: 40px;
    }
    
    .file-card-icon i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .files-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Image Preview Modal ===== */
#imagePreviewModal,
.image-preview-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999 !important;
    padding: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
}

#imagePreviewModal.visible,
.image-preview-overlay.visible {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.image-preview-modal {
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.image-preview-body {
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0f172a !important;
    min-height: 300px;
    max-height: calc(90vh - 140px);
    overflow: hidden;
}

.image-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1rem;
}

.image-preview-container img {
    max-width: 100%;
    max-height: calc(90vh - 160px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments for image preview */
@media (max-width: 768px) {
    #imagePreviewModal,
    .image-preview-overlay {
        padding: 0.5rem;
    }
    
    .image-preview-modal {
        max-width: 95vw !important;
        max-height: 95vh !important;
        margin: 0.5rem;
    }
    
    .image-preview-body {
        max-height: calc(95vh - 130px);
    }
    
    .image-preview-container img {
        max-height: calc(95vh - 150px);
    }
}

/* Status Dropdown Styles */
.admin-status-selector {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.admin-status-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-status-dropdown:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.admin-status-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 16px rgba(59, 130, 246, 0.15);
}

.admin-status-dropdown option {
    background: #ffffff;
    color: #0f172a;
    padding: 0.5rem;
}

/* ===== Documents List ===== */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.document-list-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

/* Expired documents in document list */
.document-list-item.document-expired {
    opacity: 0.5;
    background: rgba(100, 116, 139, 0.05);
    border-color: rgba(100, 116, 139, 0.15);
}

.document-list-item.document-expired:hover {
    opacity: 0.65;
    background: rgba(100, 116, 139, 0.08);
    transform: translateX(2px);
    box-shadow: none;
}

.document-list-item.document-expired .document-list-type {
    background: #64748b !important;
    color: #ffffff !important;
}

.document-list-item.document-expired .document-list-name {
    color: #64748b;
    text-decoration: line-through;
}

.document-list-item.document-expired .document-list-download {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    opacity: 0.7;
}

.document-list-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.document-list-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.document-list-type.avv {
    background: rgba(168, 85, 247, 0.1);
    color: #6b21a8;
}

.document-list-type.quote {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.document-list-type.invoice {
    background: rgba(34, 197, 94, 0.1);
    color: #0f5132;
}

.document-list-type.contract {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.document-list-type.receipt {
    background: rgba(249, 115, 22, 0.1);
    color: #7c2d12;
}

.document-list-name {
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-list-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}

.document-list-date {
    white-space: nowrap;
}

.document-list-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(180deg, #4ea8ff 0%, #2b6fd6 100%);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.document-list-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 111, 214, 0.3);
    color: white;
}

/* === Workflow Mini Indicator (Admin Table) === */
.workflow-mini-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.workflow-mini-progress {
    width: 40px;
    height: 40px;
}

.workflow-mini-circle {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.workflow-mini-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 3;
}

.workflow-mini-bar {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
}

.workflow-mini-bar.workflow-mini-info {
    stroke: #3b82f6;
}

.workflow-mini-bar.workflow-mini-warning {
    stroke: #f59e0b;
}

.workflow-mini-bar.workflow-mini-success {
    stroke: #10b981;
}

.workflow-mini-text {
    fill: #64748b;
    font-size: 8px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    transform: rotate(90deg);
    transform-origin: 18px 20.5px;
}

.workflow-mini-info {
    max-width: 120px;
    text-align: center;
}

.workflow-mini-phase {
    font-size: 0.7rem;
    color: #64748b;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workflow-cell {
    min-width: 140px;
}

.workflow-cell .spinner-border-sm {
    width: 1.2rem;
    height: 1.2rem;
}

/* ================================================================
   RESPONSIVE STYLES - MOBILE & TABLET
   ================================================================ */

/* ===== Large Tablets (992px - 1199px) ===== */
@media (max-width: 1199px) {
    .admin-projects-title {
        font-size: 2rem;
    }
    
    .admin-header-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .admin-header-icon {
        font-size: 2rem;
    }
    
    .controls-wrapper {
        grid-template-columns: 1.5fr 1fr auto;
        gap: 1.5rem;
    }
}

/* ===== Tablets (768px - 991px) ===== */
@media (max-width: 991px) {
    .admin-projects-page {
        padding: 0.5rem 0;
    }
    
    .admin-projects-title {
        font-size: 1.75rem;
    }
    
    .admin-projects-subtitle {
        font-size: 0.9rem;
    }
    
    .admin-header-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .admin-header-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .controls-wrapper {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .controls-card {
        padding: 1.5rem;
    }
    
    .admin-projects-table th,
    .admin-projects-table td {
        padding: 1rem 0.75rem;
    }
    
    .admin-projects-table th:first-child,
    .admin-projects-table td:first-child {
        padding-left: 1rem;
    }
    
    .admin-projects-table th:last-child,
    .admin-projects-table td:last-child {
        padding-right: 1rem;
    }
    
    .project-details-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-details-sidebar {
        order: -1;
    }
    
    .detail-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

/* ===== Mobile Landscape & Small Tablets (576px - 767px) ===== */
@media (max-width: 767px) {
    .admin-projects-page {
        background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Header adjustments */
    .admin-projects-header {
        margin-bottom: 1rem !important;
    }
    
    .admin-header-card {
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .admin-header-icon-wrapper {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }
    
    .admin-header-icon {
        font-size: 1.75rem;
    }
    
    .admin-projects-title {
        font-size: 1.5rem;
        margin-bottom: 0.35rem;
    }
    
    .admin-projects-subtitle {
        font-size: 0.85rem;
    }
    
    .admin-header-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        padding: 0.875rem;
        gap: 0.5rem;
        text-align: center;
    }
    
    .stat-card > i {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .stat-value {
        font-size: 1.35rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    /* Controls section */
    .admin-projects-controls {
        margin-bottom: 1rem !important;
    }
    
    .controls-card {
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    .controls-wrapper {
        gap: 1rem;
    }
    
    .control-label {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
    
    .admin-projects-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .admin-projects-search {
        padding-left: 2.75rem !important;
    }
    
    .admin-projects-select {
        padding-left: 2.75rem !important;
        padding-right: 2.75rem;
    }
    
    .search-icon,
    .select-prefix-icon {
        left: 1rem;
        font-size: 0.85rem;
    }
    
    .admin-projects-btn-reload {
        width: 100%;
        height: auto;
        padding: 0.75rem 1.25rem;
        border-radius: 12px;
        justify-content: center;
    }
    
    /* Table card */
    .admin-projects-card {
        border-radius: 14px;
    }
    
    .admin-projects-table {
        font-size: 0.85rem;
    }
    
    .admin-projects-table th {
        padding: 1rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .admin-projects-table td {
        padding: 0.875rem 0.5rem;
    }
    
    .admin-projects-table th:first-child,
    .admin-projects-table td:first-child {
        padding-left: 0.75rem;
    }
    
    .admin-projects-table th:last-child,
    .admin-projects-table td:last-child {
        padding-right: 0.75rem;
    }
    
    .project-cell-title {
        font-size: 0.875rem;
    }
    
    .project-cell-description {
        font-size: 0.75rem;
    }
    
    .project-cell-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .project-cell-user-name {
        font-size: 0.8rem;
    }
    
    .project-cell-user-email {
        font-size: 0.7rem;
    }
    
    .project-type-badge,
    .project-status-badge {
        padding: 0.35rem 0.65rem;
        font-size: 0.7rem;
    }
    
    .project-count-badge {
        min-width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .expand-icon {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
    
    /* Detail sections */
    .project-details-content {
        padding: 1.25rem;
    }
    
    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .detail-info-card {
        padding: 1rem;
    }
    
    .detail-section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 14px;
    }
    
    .detail-section-title {
        font-size: 0.95rem;
        gap: 0.5rem;
    }
    
    .detail-section-title i {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.65rem 0;
    }
    
    .detail-item-value {
        max-width: 100%;
        text-align: left;
    }
    
    /* Admin checklist */
    .admin-checklist {
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    .admin-checklist-title {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .admin-checklist-title i {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .admin-action-buttons {
        gap: 0.5rem;
    }
    
    .admin-action-btn {
        width: 44px;
        height: 44px;
    }
    
    .admin-action-btn i {
        font-size: 1.2rem;
    }
    
    .admin-checklist-item {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .admin-checklist-notes textarea {
        min-height: 80px;
    }
    
    /* Files/Assets grid */
    .files-grid,
    .assets-mini-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.65rem;
    }
    
    .documents-list {
        gap: 0.65rem;
    }
    
    .document-item {
        padding: 0.75rem 0.875rem;
        border-radius: 10px;
    }
    
    .document-item-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .document-item-name {
        font-size: 0.8rem;
    }
    
    .document-item-meta {
        font-size: 0.65rem;
    }
    
    .document-item-type {
        padding: 0.1rem 0.4rem;
        font-size: 0.6rem;
    }
    
    .document-list-item {
        padding: 0.65rem;
        border-radius: 8px;
    }
    
    .document-list-type {
        font-size: 0.65rem;
        padding: 0.3rem 0.55rem;
    }
    
    .document-list-name {
        font-size: 0.8rem;
    }
    
    .document-list-meta {
        font-size: 0.75rem;
        gap: 0.75rem;
    }
    
    .document-list-download {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    /* Image preview modal mobile */
    #imagePreviewModal,
    .image-preview-overlay {
        padding: 0;
    }
    
    .image-preview-modal {
        max-width: 100vw !important;
        max-height: 100vh !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0;
        border-radius: 0;
    }
    
    .image-preview-modal .admin-modal-header {
        border-radius: 0;
        padding: 1rem;
    }
    
    .image-preview-modal .admin-modal-title {
        font-size: 0.95rem;
    }
    
    .image-preview-body {
        max-height: calc(100vh - 140px);
    }
    
    .image-preview-container {
        padding: 0.75rem;
    }
}

/* ================================================================
   GO-LIVE WORKFLOW SECTION STYLES
   ================================================================ */

.go-live-section {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.04) 0%, rgba(251, 146, 60, 0.02) 100%);
    border: 1px solid rgba(249, 115, 22, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.go-live-section h6 {
    color: #ea580c !important;
}

.go-live-section .golive-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(249, 115, 22, 0.1) !important;
    transition: all 0.2s ease;
}

.go-live-section .golive-item:hover {
    background: rgba(249, 115, 22, 0.06);
    border-color: rgba(249, 115, 22, 0.2) !important;
}

.go-live-section .golive-item.checked {
    background: rgba(22, 163, 74, 0.06);
    border-color: rgba(22, 163, 74, 0.2) !important;
}

.go-live-section .golive-item .form-check-input:checked {
    background-color: #f97316;
    border-color: #f97316;
}

.go-live-section .complete-golive-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

.go-live-section .complete-golive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.go-live-section .complete-golive-btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: none;
    cursor: not-allowed;
}

/* Animation for Go-Live section appearing */
.go-live-section {
    animation: slideInGoLive 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Email list in Admin Go-Live section */
.email-item-admin {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(25, 135, 84, 0.15);
}

.email-item-admin:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.email-item-admin:last-child {
    margin-bottom: 0 !important;
}

.configured-emails-display {
    border: 1px solid rgba(25, 135, 84, 0.2);
}

@keyframes slideInGoLive {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Orange text color utility */
.text-orange {
    color: #f97316 !important;
}

@media (max-width: 768px) {
    .image-preview-container img {
        max-height: calc(100vh - 160px);
        border-radius: 6px;
    }
    
    .image-preview-modal .admin-modal-footer {
        border-radius: 0;
        padding: 1rem;
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .image-preview-modal .admin-modal-footer .admin-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Workflow mini indicator mobile */
    .workflow-mini-indicator {
        gap: 0.2rem;
    }
    
    .workflow-mini-progress {
        width: 36px;
        height: 36px;
    }
    
    .workflow-mini-phase {
        font-size: 0.65rem;
    }
    
    /* Status selector mobile */
    .admin-status-selector {
        padding: 0.875rem;
        border-radius: 10px;
        margin-bottom: 1.25rem;
    }
    
    .admin-status-dropdown {
        padding: 0.65rem 0.875rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }
}

/* ===== Quote Questions Section (Admin Workflow) ===== */
.quote-questions-section,
.quote-conversation-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
}

.quote-questions-section h6,
.quote-conversation-section h6 {
    font-size: 0.9rem;
    font-weight: 600;
}

.quote-question-item {
    background: #ffffff;
    transition: all 0.2s ease;
}

.quote-question-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quote-reply-form {
    border-top: 1px dashed #bae6fd;
    padding-top: 0.75rem;
}

.quote-reply-input {
    border-color: #bae6fd;
}

.quote-reply-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.quote-reply-btn {
    white-space: nowrap;
}

/* Quote Conversation List */
.quote-conversation-list {
    max-height: 400px;
    overflow-y: auto;
}

.quote-comm-item {
    background: #ffffff;
    transition: all 0.2s ease;
}

.quote-comm-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ================================================================
   ADMIN CHAT STYLES (Sidebar)
   ================================================================ */

.admin-chat-container {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    padding: 0.75rem;
}

.admin-chat-messages {
    max-height: 300px;
    min-height: 160px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 1rem;
    background: #eef2f7; /* even lighter for modern look */
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.admin-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.admin-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.admin-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.admin-chat-message {
    display: flex;
    margin-bottom: 0.75rem;
}

.admin-chat-message:last-child {
    margin-bottom: 0;
}

.admin-chat-message.sent {
    justify-content: flex-end;
}

.admin-chat-message.received {
    justify-content: flex-start;
}

/* Avatar */
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#e6eefb,#dbeafe);
    color: #1e3a8a;
    font-weight: 700;
    margin: 0 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(11, 19, 43, 0.06);
}

/* Bubble noses */
.admin-chat-message.received .admin-chat-bubble::before,
.admin-chat-message.sent .admin-chat-bubble::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    border-radius: 2px;
}

.admin-chat-message.received .admin-chat-bubble::before {
    left: -6px;
    top: 16px;
    background: #ffffff;
    border-left: 1px solid rgba(15,23,42,0.04);
}

.admin-chat-message.sent .admin-chat-bubble::after {
    right: -6px;
    top: 16px;
    background: linear-gradient(135deg, #2d8cf0 0%, #2b6ed6 100%);
}

.admin-chat-bubble {
    max-width: 82%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.admin-chat-message.sent .admin-chat-bubble {
    background: linear-gradient(135deg, #2d8cf0 0%, #2b6ed6 100%);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.admin-chat-message.received .admin-chat-bubble {
    background: #ffffff;
    color: #0f172a; /* dark text for readability */
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom-left-radius: 8px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.admin-chat-sender {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.25rem;
}

.admin-chat-message.sent .admin-chat-sender {
    color: rgba(255, 255, 255, 0.85);
}

.admin-chat-message.received .admin-chat-sender {
    color: #2563eb;
}

.admin-chat-text {
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.admin-chat-time {
    font-size: 0.6rem;
    opacity: 0.6;
    text-align: right;
    margin-top: 0.3rem;
}

.admin-chat-input {
    background: transparent;
    border-radius: 8px;
    padding: 0.25rem;
}

.admin-chat-input .input-group {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,0.06);
}

.admin-chat-input .form-control {
    border-radius: 20px 0 0 20px;
    font-size: 0.95rem;
    border: none;
    background: #ffffff;
    color: #0f172a;
    padding: 0.6rem 0.9rem;
}

.admin-chat-input .form-control::placeholder {
    color: #94a3b8;
}

.admin-chat-input .form-control:focus {
    background: #ffffff;
    box-shadow: none;
}

.admin-chat-input .btn {
    border-radius: 0 20px 20px 0;
    padding: 0.45rem 0.9rem;
    box-shadow: 0 6px 18px rgba(43,110,214,0.18);
}

/* Internal notes styling - larger and softer */
.admin-notes-textarea {
    min-height: 160px;
    max-height: 600px;
    background: linear-gradient(180deg,#ffffff,#fbfdff);
    border: 1px solid rgba(15,23,42,0.06);
    color: #0f172a;
    padding: 0.75rem;
    border-radius: 8px;
}

/* Empty state for chat */
.admin-chat-messages .text-center {
    padding: 1.5rem 0.5rem;
}

.admin-chat-messages .text-center i {
    color: rgba(255, 255, 255, 0.2);
}

.admin-chat-messages .text-center p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

/* Chat avatars - support for transparency */
.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.chat-avatar.has-image {
    background: transparent;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
}

.chat-avatar .avatar-initials {
    position: relative;
    z-index: 1;
    display: block;
}


/* --- admin-workflow-editor.css --- */
/* ===== Workflow Editor Section (Admin Projects) ===== */
.workflow-editor-section {
    margin-top: 2rem;
}

.workflow-editor-container {
    padding: 1rem 0;
}

.workflow-editor-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.workflow-editor-step {
    display: flex;
    flex-direction: column;
    gap: 0; /* Gap handled by padding/margin internally */
    padding: 0; /* Padding moved to children */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(15, 23, 42, 0.1);
    border-left: 4px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.workflow-editor-step-main {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.workflow-editor-step::before {
    content: '',
    position: absolute,
    top: 0,
    left: 0,
    right: 0,
    bottom: 0,
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.01) 100%);
    pointer-events: none;
}

.workflow-editor-step.current {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    border-left-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.workflow-editor-step.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.35);
    border-left-color: #10b981;
}

/* Tint substeps to match parent step background */
.workflow-editor-step.completed .workflow-editor-substep {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.15);
}

.workflow-editor-step.current .workflow-editor-substep {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.15);
}

.workflow-editor-step.locked .workflow-editor-substep {
    background: rgba(156, 163, 175, 0.04);
    border-color: rgba(156, 163, 175, 0.1);
}

.workflow-editor-step.locked {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.12) 0%, rgba(156, 163, 175, 0.08) 100%);
    border-color: rgba(156, 163, 175, 0.25);
    border-left-color: #9ca3af;
    opacity: 0.65;
}

.workflow-editor-step-info {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    position: relative;
    z-index: 1;
}

.workflow-editor-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.workflow-editor-step.completed .workflow-editor-step-number {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.workflow-editor-step.locked .workflow-editor-step-number {
    background: #9ca3af;
    box-shadow: none;
}

.workflow-editor-step-details {
    flex: 1;
    min-width: 0;
}

.workflow-editor-step-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.workflow-editor-step.completed .workflow-editor-step-title {
    color: #065f46;
}

.workflow-editor-step.locked .workflow-editor-step-title {
    color: #6b7280;
}

.workflow-editor-step-description {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.workflow-editor-step.completed .workflow-editor-step-description {
    color: #0a8659;
}

.workflow-editor-step.locked .workflow-editor-step-description {
    color: #9ca3af;
}

.workflow-editor-step-status {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.workflow-editor-step-status .badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.workflow-editor-step-actions {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.workflow-step-complete,
.workflow-step-undo {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.workflow-step-complete {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.12) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    color: #065f46;
}

.workflow-step-complete:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.workflow-step-undo {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15) 0%, rgba(107, 114, 128, 0.12) 100%);
    border: 1.5px solid rgba(156, 163, 175, 0.35);
    color: #374151;
}

.workflow-step-undo:hover {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.25) 0%, rgba(107, 114, 128, 0.2) 100%);
    border-color: rgba(156, 163, 175, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.25);
}

/* Substeps Styling */
.workflow-editor-substeps {
    padding: 0 1rem 1rem 4rem; /* Indent to align with text */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.03);
    margin-top: -0.5rem;
    padding-top: 1rem;
    text-align: left;
}

.workflow-editor-substep {
    display: flex;
    flex-direction: column; /* Changed from row to column to stack header and details */
    align-items: flex-start;
    gap: 0; /* Clear gap, handle internally */
    padding: 0; /* Clear padding, handle in children */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 0.95rem;
    color: #475569;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 0.25rem;
}

/* Header part of the substep (always visible) */
.workflow-editor-substep-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    cursor: pointer;
}

.workflow-editor-substep.has-details .workflow-editor-substep-header:hover {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px 8px 0 0;
}

/* Adjust existing styles to target header children */
.workflow-editor-substep .substep-icon {
    /* styles maintained via inheritance or specific targeting */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #94a3b8;
}

/* Ensure colors work on the substep container */
.workflow-editor-substep.completed {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

/* Status-based colors for labels and values to match background */
.workflow-editor-step.completed .substep-title { color: #065f46; }
.workflow-editor-step.completed .substep-detail-label { color: #0a8659; }

.workflow-editor-step.current .substep-title { color: #1e40af; }
.workflow.editor-step.current .substep-detail-label { color: #3b82f6; }

.workflow-editor-step.locked .substep-title { color: #6b7280; }
.workflow-editor-step.locked .substep-detail-label { color: #9ca3af; }

.workflow-editor-substep.completed .substep-icon {
    color: #10b981;
}

.workflow-editor-substep.required .substep-icon {
    color: #64748b; 
}

.workflow-editor-substep .substep-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-editor-substep .substep-title {
    font-weight: 600;
}

/* New: Toggle Icon */
.substep-toggle-icon {
    margin-left: auto;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.workflow-editor-substep.expanded .substep-toggle-icon {
    transform: rotate(180deg);
}

/* New: Details Section */
.workflow-editor-substep-details {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out, padding 0.3s ease, margin 0.3s ease;
    opacity: 0; /* Helper for smooth fade */
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0 0 10px 10px;
    font-size: 0.9rem;
    width: 100%;
}

.workflow-editor-substep.expanded .workflow-editor-substep-details {
    max-height: 1000px; /* Allow expansion */
    padding: 0 0.75rem 0.75rem 2.5rem; /* Indented padding */
    opacity: 1;
    border-top: 1px solid rgba(0,0,0,0.03);
}

/* Detail Rows */
.substep-detail-row {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.substep-detail-row:last-child {
    margin-bottom: 0;
}

.substep-detail-label {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.02em;
}

.substep-detail-value {
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.5;
}

.substep-detail-value.empty {
    color: #94a3b8;
    font-style: italic;
}

/* Asset Item in details */
.substep-asset-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .workflow-editor-step-main {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem;
        padding: 1rem;
    }

    .workflow-editor-step-info {
        width: 100%;
    }

    .workflow-editor-step-status {
        width: 100%;
        justify-content: flex-start !important;
    }

    .workflow-editor-step-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .workflow-editor-substeps {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .workflow-editor-substep-header {
        padding: 0.5rem;
    }

    .workflow-editor-substep.expanded .workflow-editor-substep-details {
        padding-left: 2rem;
    }
}

@media (max-width: 575px) {
    .workflow-editor-section {
        margin-top: 1.5rem;
    }
    
    .workflow-editor-container {
        padding: 0.75rem 0;
    }
    
    .workflow-editor-steps {
        gap: 0.65rem;
    }
    
    .workflow-editor-step {
        border-radius: 10px;
        border-left-width: 3px;
    }
    
    .workflow-editor-step-main {
        padding: 0.875rem;
        gap: 0.65rem;
    }
    
    .workflow-editor-step-info {
        gap: 0.65rem;
    }
    
    .workflow-editor-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .workflow-editor-step-title {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .workflow-editor-step-description {
        font-size: 0.75rem;
    }
    
    .workflow-editor-step-status .badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.65rem;
    }
    
    .workflow-step-complete,
    .workflow-step-undo {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 8px;
    }
    
    .workflow-editor-substeps {
        padding: 0.875rem;
        padding-top: 0.875rem;
        margin-top: -0.35rem;
    }
    
    .workflow-editor-substep {
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .workflow-editor-substep-header {
        padding: 0.625rem;
        gap: 0.65rem;
    }
    
    .workflow-editor-substep .substep-icon {
        width: 18px;
        height: 18px;
        font-size: 0.9rem;
    }
    
    .workflow-editor-substep .substep-title {
        font-size: 0.85rem;
    }
    
    .substep-toggle-icon {
        font-size: 0.9rem;
    }
    
    .workflow-editor-substep.expanded .workflow-editor-substep-details {
        padding: 0.65rem;
        padding-left: 2rem;
        font-size: 0.8rem;
    }
    
    .substep-detail-row {
        margin-bottom: 0.45rem;
    }
    
    .substep-detail-label {
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
    }
    
    .substep-detail-label i {
        font-size: 0.9em;
        width: 16px;
    }
    
    .substep-detail-value {
        font-size: 0.8rem;
    }
    
    .substep-detail-list {
        gap: 0.35rem !important;
        margin-top: 0.35rem !important;
    }
    
    .substep-detail-list .badge {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .substep-asset-item {
        padding: 0.5rem;
        gap: 0.65rem;
        font-size: 0.8rem;
        border-radius: 8px;
        margin-bottom: 0.35rem;
    }
    
    .substep-asset-item i {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .workflow-editor-step-info {
        gap: 0.5rem;
    }

    .workflow-editor-step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .workflow-editor-step-title {
        font-size: 0.825rem;
    }
    
    .workflow-editor-step-description {
        font-size: 0.7rem;
    }
    
    .workflow-editor-substeps {
        padding: 0.65rem;
    }
    
    .workflow-editor-substep-header {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .workflow-editor-substep .substep-title {
        font-size: 0.8rem;
    }
    
    .workflow-editor-substep.expanded .workflow-editor-substep-details {
        padding: 0.5rem;
        padding-left: 1.75rem;
    }

    .workflow-editor-step-status {
        width: 100%;
        justify-content: flex-start !important;
    }

    .workflow-editor-step-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .workflow-editor-substeps {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .workflow-editor-substep-header {
        padding: 0.5rem;
    }

    .workflow-editor-substep.expanded .workflow-editor-substep-details {
        padding-left: 2rem;
    }
}

@media (max-width: 575px) {
    .workflow-editor-section {
        margin-top: 1.5rem;
    }
    
    .workflow-editor-container {
        padding: 0.75rem 0;
    }
    
    .workflow-editor-steps {
        gap: 0.65rem;
    }
    
    .workflow-editor-step {
        border-radius: 10px;
        border-left-width: 3px;
    }
    
    .workflow-editor-step-main {
        padding: 0.875rem;
        gap: 0.65rem;
    }
    
    .workflow-editor-step-info {
        gap: 0.65rem;
    }
    
    .workflow-editor-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .workflow-editor-step-title {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .workflow-editor-step-description {
        font-size: 0.75rem;
    }
    
    .workflow-editor-step-status .badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.65rem;
    }
    
    .workflow-step-complete,
    .workflow-step-undo {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 8px;
    }
    
    .workflow-editor-substeps {
        padding: 0.875rem;
        padding-top: 0.875rem;
        margin-top: -0.35rem;
    }
    
    .workflow-editor-substep {
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .workflow-editor-substep-header {
        padding: 0.625rem;
        gap: 0.65rem;
    }
    
    .workflow-editor-substep .substep-icon {
        width: 18px;
        height: 18px;
        font-size: 0.9rem;
    }
    
    .workflow-editor-substep .substep-title {
        font-size: 0.85rem;
    }
    
    .substep-toggle-icon {
        font-size: 0.9rem;
    }
    
    .workflow-editor-substep.expanded .workflow-editor-substep-details {
        padding: 0.65rem;
        padding-left: 2rem;
        font-size: 0.8rem;
    }
    
    .substep-detail-row {
        margin-bottom: 0.45rem;
    }
    
    .substep-detail-label {
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
    }
    
    .substep-detail-label i {
        font-size: 0.9em;
        width: 16px;
    }
    
    .substep-detail-value {
        font-size: 0.8rem;
    }
    
    .substep-detail-list {
        gap: 0.35rem !important;
        margin-top: 0.35rem !important;
    }
    
    .substep-detail-list .badge {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .substep-asset-item {
        padding: 0.5rem;
        gap: 0.65rem;
        font-size: 0.8rem;
        border-radius: 8px;
        margin-bottom: 0.35rem;
    }
    
    .substep-asset-item i {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .workflow-editor-step-info {
        gap: 0.5rem;
    }

    .workflow-editor-step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .workflow-editor-step-title {
        font-size: 0.825rem;
    }
    
    .workflow-editor-step-description {
        font-size: 0.7rem;
    }
    
    .workflow-editor-substeps {
        padding: 0.65rem;
    }
    
    .workflow-editor-substep-header {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .workflow-editor-substep .substep-title {
        font-size: 0.8rem;
    }
    
    .workflow-editor-substep.expanded .workflow-editor-substep-details {
        padding: 0.5rem;
        padding-left: 1.75rem;
    }
}


/* --- account-decryptor.css --- */

/* Page Title */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.95);
  letter-spacing: -0.3px;
}

/* Buttons */
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.15) 0%, rgba(51, 65, 85, 0.1) 100%);
  color: rgba(203, 213, 225, 0.85);
  text-decoration: none;
}

.btn-glass:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.25) 0%, rgba(51, 65, 85, 0.2) 100%);
  border-color: rgba(148, 163, 184, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
  color: rgba(241, 245, 249, 0.95);
}

.btn-primary-glass {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: #ffffff;
}

.btn-primary-glass:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0.3) 100%);
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-success-glass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.25);
  color: rgba(167, 243, 208, 0.95);
}

.btn-success-glass:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.25) 100%);
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-danger-glass {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
  border-color: rgba(239, 68, 68, 0.25);
  color: rgba(252, 165, 165, 0.95);
}

.btn-danger-glass:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.25) 100%);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-warning-glass {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
  border-color: rgba(245, 158, 11, 0.25);
  color: rgba(253, 230, 138, 0.95);
}

.btn-warning-glass:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.25) 100%);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Small button variant */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Input Fields */
.glass-input, .glass-select {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(241, 245, 249, 0.95);
  font-size: 0.95rem;
  outline: none;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-input:focus, .glass-select:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.glass-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.glass-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  padding-right: 2.5rem;
  appearance: none;
  cursor: pointer;
}

.glass-select option {
  background-color: #1e293b;
  color: rgba(241, 245, 249, 0.95);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.info-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 220ms;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.info-label {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-label i {
  color: rgba(6, 182, 212, 0.6);
}

.info-value {
  color: rgba(241, 245, 249, 0.95);
  font-size: 1.1rem;
  font-weight: 700;
  word-break: break-word;
}

.storage-percent-text {
  font-weight: 700;
  color: rgba(148,163,184,0.65);
}

.storage-percent-text.success { color: rgba(34,197,94,0.95); }
.storage-percent-text.warning { color: rgba(234,179,8,0.95); }
.storage-percent-text.danger { color: rgba(239,68,68,0.95); }

.storage-fill.success { background: linear-gradient(90deg,#10b981,#34d399); }
.storage-fill.warning { background: linear-gradient(90deg,#f59e0b,#f97316); }
.storage-fill.danger { background: linear-gradient(90deg,#ef4444,#f43f5e); }

/* User Cards */
.user-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.user-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(8, 14, 31, 0.5) 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 220ms;
}

.user-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.user-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.95);
  margin-bottom: 0.5rem;
}

.user-email {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.8);
  margin-bottom: 1rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.role-badge.admin {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  border-color: rgba(239, 68, 68, 0.2);
  color: rgba(252, 165, 165, 0.95);
}

.role-badge.verified {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  border-color: rgba(16, 185, 129, 0.2);
  color: rgba(167, 243, 208, 0.95);
}

/* Tabs */
.glass-tabs {
  display: flex;
  gap: 0.5rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.glass-tab {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  transition: all 220ms;
}

.glass-tab:hover {
  color: rgba(241, 245, 249, 0.95);
  background: rgba(255, 255, 255, 0.05);
}

.glass-tab.active {
  color: rgba(147, 197, 253, 0.95);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
  border-color: rgba(59, 130, 246, 0.2);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* JSON Display */
.json-display {
  background: rgba(5, 8, 17, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 0.75rem;
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.95);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 500px;
  overflow: auto;
  line-height: 1.6;
}

/* Alerts */
.glass-alert {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(8, 14, 31, 0.5) 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.875rem;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.glass-alert.danger {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.2) 0%, rgba(70, 13, 13, 0.1) 100%);
}

.glass-alert.warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(78, 22, 6, 0.2) 0%, rgba(54, 21, 7, 0.1) 100%);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 16, 42, 0.95), rgba(11, 18, 32, 0.92));
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.loading-spinner-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}

.loading-spinner-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: rgba(6, 182, 212, 0.8);
  border-right-color: rgba(6, 182, 212, 0.4);
  animation: spin-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-spinner-ring-2 {
  width: 100px;
  height: 100px;
  border-top-color: rgba(59, 130, 246, 0.7);
  border-right-color: rgba(59, 130, 246, 0.3);
  animation-duration: 1.5s;
  animation-direction: reverse;
}

.loading-spinner-ring-3 {
  width: 80px;
  height: 80px;
  border-top-color: rgba(147, 51, 234, 0.6);
  border-right-color: rgba(147, 51, 234, 0.2);
  animation-duration: 1.8s;
}

.loading-spinner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
}

/* Pulsing center dot instead of icon */
.loading-spinner-content::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(59, 130, 246, 0.8));
  animation: pulse-dot 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Hide the icon - we use the dot instead */
.loading-spinner-content i {
  display: none;
}

@keyframes spin-ring {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: rgba(203, 213, 225, 0.95);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  animation: pulse-text 2s ease-in-out infinite;
  text-align: center;
  margin-top: 2rem;
}

@keyframes pulse-text {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* Indeterminate progress bar under loading text */
.loading-progress-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.loading-progress-fill {
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.6), rgba(59, 130, 246, 0.8), rgba(147, 51, 234, 0.6));
  animation: indeterminate-slide 1.8s ease-in-out infinite;
}

@keyframes indeterminate-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

/* ===== CONFIRMATION MODAL ===== */

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.confirm-modal {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 14, 31, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 1.25rem;
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modal-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
}

.confirm-modal-icon.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
  border: 2px solid rgba(245, 158, 11, 0.3);
  color: rgba(251, 191, 36, 0.95);
}

.confirm-modal-icon.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: rgba(248, 113, 113, 0.95);
}

.confirm-modal-icon.info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
  border: 2px solid rgba(59, 130, 246, 0.3);
  color: rgba(96, 165, 250, 0.95);
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.98);
  text-align: center;
  margin-bottom: 0.75rem;
}

.confirm-modal-message {
  font-size: 0.95rem;
  color: rgba(148, 163, 184, 0.9);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.confirm-modal-actions .btn-glass {
  min-width: 120px;
  justify-content: center;
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 14, 31, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 320px;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.hiding {
  animation: toast-slide-out 0.3s ease-in forwards;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.toast.success .toast-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: rgba(74, 222, 128, 0.95);
}

.toast.error .toast-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgba(248, 113, 113, 0.95);
}

.toast.warning .toast-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: rgba(251, 191, 36, 0.95);
}

.toast.info .toast-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: rgba(96, 165, 250, 0.95);
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.98);
  margin-bottom: 0.2rem;
}

.toast-message {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.85);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 200ms;
  flex-shrink: 0;
}

.toast-close:hover {
  color: rgba(148, 163, 184, 0.9);
  background: rgba(148, 163, 184, 0.1);
}

@media (max-width: 480px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    top: 1rem;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
  
  .confirm-modal {
    margin: 1rem;
    padding: 1.5rem;
  }
}

.loading-spinner {
  text-align: center;
}

.loading-spinner i {
  font-size: 3rem;
  color: rgba(6, 182, 212, 0.8);
  animation: spin-anim 1s linear infinite;
}

.loading-spinner p {
  margin-top: 1rem;
  color: rgba(148, 163, 184, 0.8);
  font-weight: 600;
}

@keyframes spin-anim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Security pane styles */
.security-grid {
  display: grid;
  gap: 0.5rem;
}

.security-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
}

.sec-label {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
}

.sec-value {
  color: rgba(241, 245, 249, 0.95);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 80px;
  text-align: right;
}

.sec-value.positive {
  color: rgba(52, 211, 153, 0.95);
  background: rgba(52, 211, 153, 0.06);
  padding: 6px 10px;
  border-radius: 8px;
}

.sec-value.negative {
  color: rgba(248, 113, 113, 0.95);
  background: rgba(248, 113, 113, 0.04);
  padding: 6px 10px;
  border-radius: 8px;
}

@media (max-width: 576px) {
  .security-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .sec-value { text-align: left; }
}

/* Projects list - refined */
.project-card {
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.55), rgba(6, 10, 20, 0.45));
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2,6,23,0.45);
  border-color: rgba(59,130,246,0.12);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.25rem;
}

.project-title {
  font-weight: 700;
  color: rgba(241,245,249,0.98);
  font-size: 1.02rem;
}

.project-meta {
  color: rgba(148,163,184,0.75);
  font-size: 0.85rem;
  margin-top: 2px;
}

.project-stats {
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.85rem;
}

.project-toggle i {
  color: rgba(148, 163, 184, 0.7);
  transition: transform 220ms ease, color 220ms ease;
}

.project-card.open .project-toggle i {
  transform: rotate(180deg);
  color: rgba(147,197,253,0.95);
}

.project-body {
  margin-top: 0.75rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.04);
  padding-top: 0.85rem;
  animation: fadeIn 180ms ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: translateY(0); } }

.project-card .info-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(148, 163, 184, 0.04);
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  min-width: 110px;
}

.project-title + .project-meta { display:block; }

.project-badge {
  display:inline-flex; align-items:center; gap:0.4rem;
  padding:6px 10px; border-radius:999px; font-weight:700;
}
.project-badge.status {
  background: rgba(146, 197, 253, 0.06);
  color: rgba(147,197,253,0.95);
  border: 1px solid rgba(59,130,246,0.12);
}

/* Project detail modal styling */
#projectDetailContent {
  padding: 0.25rem 0.5rem;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem 1.25rem;
}

.project-detail-row {
  display: contents; /* rows are represented by label + value grid cells */
}

.project-detail-label {
  color: rgba(148,163,184,0.85);
  font-weight: 700;
  align-self: start;
  padding: 0.6rem 0.2rem;
}

.project-detail-value {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(148,163,184,0.06);
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  color: rgba(241,245,249,0.95);
  white-space: pre-wrap;
  word-break: break-word;
}

.project-detail-value .small-json {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: rgba(203,213,225,0.9);
}

/* Highlight important fields */
.project-detail-label.highlight { color: rgba(147,197,253,0.95); }
.project-detail-value.highlight { box-shadow: inset 0 0 0 1px rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.12); }

/* Owner small layout */
.project-detail-value .small.text-secondary { margin-top: 2px;}

/* Make modal header stand out */
#projectDetailModal .modal-header {
  background: linear-gradient(90deg, rgba(10,25,45,0.5), rgba(15,20,35,0.5));
  border-bottom: 1px solid rgba(148,163,184,0.04);
}

#projectDetailModal .modal-content {
  border-radius: 1rem;
}

@media (max-width: 768px) {
  .page-title { font-size: 1.25rem; }
  .info-grid { grid-template-columns: 1fr; }
  .user-cards-grid { grid-template-columns: 1fr; }
  .btn-glass { width: 100%; justify-content: center; }
}

@media (max-width: 900px) {
  .project-detail-grid { grid-template-columns: 1fr; }
  .project-detail-label { padding-top: 0.4rem; }
}

.changes-group.added .change-file-item {
  color: rgba(134, 239, 172, 0.9);
}

.changes-group.modified .change-file-item {
  color: rgba(147, 197, 253, 0.9);
}

.changes-group.deleted .change-file-item {
  color: rgba(252, 165, 165, 0.9);
}

.change-file-more {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.7);
  font-style: italic;
  padding: 0.25rem 0.5rem;
  margin-top: 0.25rem;
}

/* Badge styles for backup info */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.badge.bg-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: rgba(167, 243, 208, 0.95);
}

.badge.bg-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: rgba(253, 230, 138, 0.95);
}

.badge.bg-secondary {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.2), rgba(51, 65, 85, 0.15));
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: rgba(203, 213, 225, 0.9);
}

.badge.bg-dark {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.3), rgba(15, 23, 42, 0.2));
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: rgba(148, 163, 184, 0.95);
}

.badge i {
  font-size: 0.75rem;
}

/* Light muted text - better readable on dark backgrounds */
.text-light-muted {
  color: rgba(203, 213, 225, 0.85) !important;
}

.text-light-muted i {
  color: rgba(148, 163, 184, 0.7);
}

/* ===== orjicloud Form Select & Input-Group Polish ===== */
.admin-page .form-select,
.modal .form-select {
    background-color: #0c1422 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.admin-page .form-select:hover,
.modal .form-select:hover {
    border-color: rgba(99, 102, 241, 0.45) !important;
    background-color: #0f192b !important;
}

.admin-page .form-select:focus,
.modal .form-select:focus {
    background-color: #101c30 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

.admin-page .form-select option,
.modal .form-select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
}

/* Color Picker Input Styling */
.admin-page .form-control-color,
.modal .form-control-color {
    width: 44px !important;
    height: 38px !important;
    padding: 4px !important;
    border-radius: 0 10px 10px 0 !important;
    border: 1px solid var(--admin-border, rgba(148, 163, 184, 0.2)) !important;
    background-color: var(--admin-bg-input, #0f172a) !important;
    cursor: pointer !important;
}

.admin-page .form-control-color::-webkit-color-swatch-wrapper,
.modal .form-control-color::-webkit-color-swatch-wrapper {
    padding: 0 !important;
}

.admin-page .form-control-color::-webkit-color-swatch,
.modal .form-control-color::-webkit-color-swatch {
    border: none !important;
    border-radius: 6px !important;
}

.admin-page .input-group .form-control:not(:first-child):not(:last-child),
.modal .input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}




/* ================================================================
   AI Quest Generator: Multi-Select Filter Dropdowns (orji-Design)
   ================================================================ */

.aiquest-multiselect {
    position: relative;
    width: 100%;
}

.aiquest-multiselect > .form-label {
    margin-bottom: 0.4rem;
}

/* Trigger (Button-Optik passend zu form-select / admin Inputs) */
.aiquest-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.8rem;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    background: var(--admin-bg-input);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--admin-text-primary);
    cursor: pointer;
    text-align: left;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    overflow: hidden;
}

.aiquest-compact .aiquest-trigger {
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 0 0.65rem;
    font-size: 0.82rem;
    border-radius: 8px;
}

.aiquest-compact .aiquest-summary-auto {
    font-size: 0.8rem;
    font-weight: 500;
}

.aiquest-compact .aiquest-chip {
    font-size: 0.68rem;
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    max-width: 110px;
}

.aiquest-compact .aiquest-dropdown {
    min-width: 240px;
}

html[data-theme="light"] .aiquest-trigger {
    border-color: #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aiquest-trigger:hover:not(:disabled),
.aiquest-trigger.open {
    border-color: rgba(99, 102, 241, 0.55);
    background: var(--admin-bg-tertiary);
}

.aiquest-trigger.open {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.aiquest-trigger:focus-visible {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.aiquest-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Zusammenfassung im Trigger (strikt einzeilig, kein Umbruch) */
.aiquest-summary {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.aiquest-summary-auto {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--admin-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-grow: 1;
}

.aiquest-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.38);
    color: #93c5fd;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 135px;
    min-width: 0;
    flex-shrink: 0;
    line-height: 1.2;
}

.aiquest-chip-emoji {
    font-size: 0.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.aiquest-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

html[data-theme="light"] .aiquest-chip {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
    color: #1d4ed8;
}

.aiquest-chip-more {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--admin-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.45rem;
    border-radius: 6px;
    flex-shrink: 0;
}

html[data-theme="light"] .aiquest-chip-more {
    background: rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
    color: #475569;
}

.aiquest-caret {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.aiquest-trigger.open .aiquest-caret {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* Outside-Click Overlay + Dropdown-Panel */
.aiquest-overlay {
    position: fixed;
    inset: 0;
    z-index: 3090;
    background: transparent;
    border: none;
}

.aiquest-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 3100;
    background: var(--admin-bg-secondary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    box-shadow: var(--admin-shadow-lg);
    overflow: hidden;
    animation: aiquestDropdownFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.aiquest-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: var(--admin-bg-tertiary);
    border-bottom: 1px solid var(--admin-border);
}

.aiquest-dropdown-hint {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-text-muted);
}

.aiquest-dropdown-action {
    background: transparent;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    transition: all 0.15s ease;
}

.aiquest-dropdown-action:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.45);
    color: var(--admin-text-primary);
}

.aiquest-dropdown-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.aiquest-dropdown-list {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.aiquest-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--admin-text-primary);
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.aiquest-option:hover {
    background: var(--admin-table-hover);
}

.aiquest-option.active {
    background: rgba(59, 130, 246, 0.09);
    border-left-color: #3b82f6;
}

.aiquest-option-emoji {
    font-size: 0.95rem;
    line-height: 1;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.aiquest-option-label {
    flex-grow: 1;
    min-width: 0;
}

/* Custom Checkbox */
.aiquest-check {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1.5px solid var(--admin-border);
    background: var(--admin-bg-input);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.aiquest-check i {
    font-size: 0.6rem;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s ease;
}

.aiquest-check.checked {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}

.aiquest-check.checked i {
    opacity: 1;
    transform: scale(1);
}

.aiquest-dropdown-divider {
    height: 1px;
    background: var(--admin-border);
}

/* Themenfokus-Input passend zum Trigger-Design
   (erhöhte Spezifität, da site.css .modal-content .form-control überschreibt) */
.modal .modal-content .aiquest-topic-input {
    min-height: 42px;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.88rem !important;
    border-radius: 12px !important;
    background: var(--admin-bg-input) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--admin-text-primary) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] .modal .modal-content .aiquest-topic-input {
    border-color: #e2e8f0 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.modal .modal-content .aiquest-topic-input::placeholder {
    color: var(--admin-text-muted);
}

.modal .modal-content .aiquest-topic-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    outline: none;
}
