:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4b1f;
    --text-color: #ffffff;
    --text-muted: #e0e0e0;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --input-bg: rgba(255, 255, 255, 0.05);
    --danger-color: #ff416c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-x: hidden;
    zoom: 0.9;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    max-width: 1200px;
    margin: 0 auto;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-header h1 {
    font-size: 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.compact-btn {
    width: auto !important;
    margin: 0 !important;
    padding: 10px 20px;
    font-size: 1rem;
}

.icon {
    vertical-align: middle;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

input,
select,
textarea {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 15px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

select option {
    background: #16213e;
    color: white;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.3);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 117, 252, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s ease;
    flex: 1 1 auto;
    min-width: fit-content;
    cursor: pointer;
}

.stat-card:hover,
.stat-card.active {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stat-card.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-5px);
    z-index: 10;
}

/* Alignment Fix: Ensure wrapper doesn't wrap items */
.filter-wrapper {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    width: auto !important;
    max-width: none !important;
}

/* Clear Button Alignment & Color Fix */
button#resetDateFilter.btn-icon,
#resetDateFilter {
    background: #ff416c !important;
    /* Force RED */
    background-image: linear-gradient(135deg, #ff416c, #ff4b1f) !important;
    border: none !important;
    color: white !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(255, 65, 108, 0.4) !important;
    margin-left: 10px !important;
    flex-shrink: 0 !important;
    /* Prevent shrinking */
    padding: 0 !important;
    position: static !important;
    /* Ensure it flows with flex */
}

button#resetDateFilter:hover {
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 6px 15px rgba(255, 65, 108, 0.6) !important;
}

/* Active Filter State - Distinct Yellow Glow */
.filter-input.active-filter {
    border: 2px solid #ffff00 !important;
    /* Pure Electric Yellow */
    background: rgba(255, 255, 0, 0.05) !important;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.7), inset 0 0 5px rgba(255, 255, 0, 0.2) !important;
    color: #ffff00 !important;
    /* Also make text yellow for focus */
    font-weight: bold !important;
}

.filter-wrapper:has(.active-filter) {
    border-color: rgba(255, 255, 0, 0.4) !important;
    background: rgba(255, 255, 0, 0.05) !important;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.2) !important;
}

.stat-icon {
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-info h3::after {
    content: ":";
}

.stat-info span {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.stat-card.total .stat-icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.stat-card.queue .stat-icon {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.stat-card.done .stat-icon {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.stat-card.move .stat-icon {
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
}

.stat-card.no-decision .stat-icon {
    color: #adb5bd;
    background: rgba(108, 117, 125, 0.1);
}

.stat-card.total {
    border-bottom: 3px solid #fff;
}

.stat-card.queue {
    border-bottom: 3px solid #ffc107;
}

.stat-card.done {
    border-bottom: 3px solid #28a745;
}

.stat-card.move {
    border-bottom: 3px solid #17a2b8;
}

.stat-card.no-decision {
    border-bottom: 3px solid #adb5bd;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-box input {
    width: 100%;
    padding-left: 35px;
    padding-right: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 50px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    pointer-events: none;
}

.kebab-container {
    position: relative;
    width: 20px;
}

.kebab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.kebab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-dropdown,
.column-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a2e;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    padding: 10px;
    backdrop-filter: blur(15px);
}

.column-dropdown.show {
    display: flex;
}

.column-settings-container {
    position: relative;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    user-select: none;
}

.column-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.column-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.hidden-col {
    display: none !important;
}

.action-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100;
    min-width: 120px;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.action-dropdown.show {
    display: flex;
}

.menu-item {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.delete {
    color: var(--danger-color);
}

.menu-item svg {
    width: 16px;
    height: 16px;
}

.table-container {
    max-height: 65vh;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    position: relative;
}

.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.glass-table th,
.glass-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.glass-table th {
    background: #16213e;
    position: sticky;
    top: 0;
    z-index: 20;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.glass-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.glass-table tr:last-child td {
    border-bottom: none;
}

.status-select {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    width: auto;
}

.status-select option {
    background: #16213e;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover,
.btn-icon.active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.countdown-text {
    font-weight: bold;
    color: #ff9a9e;
    white-space: nowrap;
}

.countdown-text.urgent {
    color: #ff4d4d;
    animation: pulse 2s infinite;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
}

.pagination-controls span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .main-header {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        width: 100%;
        margin-bottom: 1rem;
    }

    .filter-group {
        justify-content: space-between;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 1cm;
    }

    body {
        background: white;
        color: black;
        padding: 0;
        display: block;
    }

    .background-shapes,
    .input-section,
    .filter-group,
    #printBtn,
    .action-btn,
    .pagination-controls,
    #exportBtn,
    #backupBtn,
    #restoreBtn,
    .main-header button,
    header {
        display: none !important;
    }

    .app-container {
        max-width: 100%;
        margin: 0;
    }

    .glass-panel {
        background: none;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .list-header h2 {
        color: black;
        border: none;
        padding: 0;
        margin: 0;
        display: none;
    }

    .stats-container {
        display: flex !important;
        gap: 1rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid #000;
        padding-bottom: 0.5rem;
        flex-wrap: wrap;
    }

    .stat-card {
        background: none !important;
        border: 1px solid #ccc !important;
        border-radius: 8px;
        color: black !important;
        box-shadow: none !important;
        transform: none !important;
        padding: 0.25rem 0.5rem;
        min-width: auto;
        flex: 0 0 auto;
    }

    .stat-card .stat-icon {
        display: none;
    }

    .stat-info {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .stat-info h3 {
        color: black !important;
        font-size: 9pt;
        margin: 0;
    }

    .stat-info h3::after {
        content: ":";
    }

    .stat-info span {
        color: black !important;
        font-size: 10pt;
        font-weight: bold;
    }

    .table-container {
        border: none;
        overflow: visible;
        max-height: none;
    }

    .glass-table {
        color: black;
        width: 100%;
        border-collapse: collapse;
    }

    .glass-table th {
        background: #f0f0f0 !important;
        color: black;
        border-bottom: 2px solid #000;
        font-weight: bold;
        padding: 8px;
        position: static;
    }

    .glass-table td {
        border-bottom: 1px solid #ddd;
        padding: 8px;
        color: black;
    }

    .glass-table tr:hover {
        background: none;
    }

    .status-select {
        border: none;
        background: none;
        color: black;
        padding: 0;
        -webkit-appearance: none;
        appearance: none;
        font-weight: 500;
    }

    .countdown-text {
        color: black !important;
        animation: none !important;
    }

    .login-overlay {
        display: none !important;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-box {
    text-align: center;
    max-width: 450px;
    width: 90%;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 65, 108, 0.5);
    /* Reddish border */
    background: linear-gradient(145deg, #1f1f2e, #161622);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.6);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.login-box {
    text-align: center;
    max-width: 400px;
    width: 90%;
    padding: 3rem 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-box h2 {
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

.filter-input,
.filter-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
}

.filter-select option {
    background: #1a1a2e;
    color: white;
}

.filter-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
}

.filter-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

@media print {

    .filter-input,
    .filter-select {
        display: none !important;
    }
}


.date-filter-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-icon.small {
    padding: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0;
}


/* Active State for Filter Input */
.filter-input.active-filter {
    background: rgba(37, 117, 252, 0.25) !important;
    border-color: #2575fc !important;
    box-shadow: 0 0 15px rgba(37, 117, 252, 0.4);
    color: #fff;
    font-weight: 600;
}

/* Enhanced Clear Button */
#clearMonthBtn {
    background: rgba(255, 65, 108, 0.15);
    border: 1px solid #ff416c;
    color: #ff416c;
    margin-left: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#clearMonthBtn:hover {
    background: #ff416c;
    color: white;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 0 15px rgba(255, 65, 108, 0.6);
}


/* Flatpickr Customization for Larger UI */
.flatpickr-calendar {
    transform: scale(1.2);
    /* Make it 20% larger */
    transform-origin: top center;
    background: #1a1a2e !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.flatpickr-day {
    color: #e0e0e0 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day:hover,
.flatpickr-day:focus {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

.flatpickr-day.inRange {
    background: rgba(37, 117, 252, 0.3) !important;
    box-shadow: -5px 0 0 rgba(37, 117, 252, 0.3), 5px 0 0 rgba(37, 117, 252, 0.3) !important;
    border-color: transparent !important;
}

.flatpickr-months .flatpickr-month {
    background: #16213e !important;
    color: white !important;
    fill: white !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #16213e !important;
}

.flatpickr-weekday {
    color: #a0a0a0 !important;
}

#dateRangeFilter {
    min-width: 220px;
    text-align: center;
}


.separator {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.7;
}

/* Ensure Red Clear Button Style Applies to the Shared Button */
#clearDateBtn {
    background: rgba(255, 65, 108, 0.15) !important;
    border: 1px solid #ff416c !important;
    color: #ff416c !important;
    margin-left: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#clearDateBtn:hover {
    background: #ff416c !important;
    color: white !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 0 15px rgba(255, 65, 108, 0.6) !important;
}

/* Apply Blue Glow to Month Input too */
#monthFilter.active-filter {
    background: rgba(37, 117, 252, 0.25) !important;
    border-color: #2575fc !important;
    box-shadow: 0 0 15px rgba(37, 117, 252, 0.4);
    color: #fff;
    font-weight: 600;
}

/* Header Search Box */
.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    /* Context for absolute positioning if needed, but flex is safer here */
}

.search-box-mini {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-box-mini input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.9rem;
    color: white;
    width: 150px;
    transition: all 0.3s ease;
}

.search-box-mini input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color);
    width: 200px;
}

/* Clear Button Styling */
.clear-search-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff4b1f;
    color: #ff4b1f;
    border-radius: 5px;
    padding: 5px;
    /* Adjust padding to match input height */
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255, 75, 31, 0.5);
    transition: all 0.3s ease;
    animation: pulseRed 2s infinite;
}

.clear-search-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 75, 31, 0.8);
    transform: scale(1.05);
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 5px rgba(255, 75, 31, 0.4);
    }

    50% {
        box-shadow: 0 0 12px rgba(255, 75, 31, 0.7);
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 75, 31, 0.4);
    }
}


/* Row Highlighting */
.glass-table tbody tr {
    transition: all 0.2s ease;
    border: 1px solid transparent;
    /* Reserve space for border */
}

.glass-table tbody tr.active-row {
    background-color: rgba(0, 229, 255, 0.1) !important;
    /* Slight turquoise tint background */
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
    /* Turquoise Glow */
    border: 1px solid #00e5ff;
    /* Turquoise Border */
    z-index: 10;
    position: relative;
}

/* Custom Date Input Styling */
input[type="date"].filter-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 8px;
    padding: 6px 10px;
    font-family: inherit;
    width: 140px;
    cursor: pointer;
    color-scheme: dark;
}

input[type="date"].filter-input:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Visibility Fix: Ensure hidden state overrides display: flex */
button#resetDateFilter.hidden,
#resetDateFilter.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.user-display { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin: 0 6px; white-space: nowrap; }

/* ---- Top-bar account chip ---- */
.user-chip {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50px; padding: 5px 14px 5px 5px;
    color: #fff; cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.user-chip:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 1rem; color: #fff;
    background: linear-gradient(135deg, #ff4b1f, #ff9068);
    flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-email { font-size: 0.82rem; opacity: 0.95; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge {
    font-size: 0.65rem; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;
    padding: 1px 8px; border-radius: 20px; margin-top: 2px;
    background: rgba(46,204,113,0.2); color: #2ecc71; border: 1px solid rgba(46,204,113,0.5);
}
.role-badge.assistant { background: rgba(52,152,219,0.2); color: #5dade2; border-color: rgba(52,152,219,0.5); }
.role-badge.viewer { background: rgba(149,165,166,0.2); color: #bdc3c7; border-color: rgba(149,165,166,0.5); }

/* ---- Account modal ---- */
.acct-box { max-width: 560px; width: 92%; max-height: 88vh; overflow-y: auto; }
.acct-head { display: flex; align-items: center; gap: 14px; margin: 1rem 0; }
.acct-head .avatar { width: 52px; height: 52px; font-size: 1.5rem; }
.acct-head .acct-email { font-size: 1.05rem; font-weight: bold; }
.acct-section { border-top: 1px solid rgba(255,255,255,0.12); padding: 1rem 0; text-align: left; }
.acct-section h3 { margin: 0 0 0.8rem; font-size: 1rem; color: var(--accent-color, #ff9068); }
.acct-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.acct-row input, .acct-row select {
    flex: 1; min-width: 140px; padding: 9px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.25); color: #fff;
}
.acct-row input:focus, .acct-row select:focus { outline: none; border-color: var(--accent-color, #ff9068); }
.acct-msg { font-size: 0.85rem; min-height: 1.2em; margin: 4px 0 8px; }
.acct-msg.ok { color: #2ecc71; }
.acct-msg.err { color: #ff6b81; }
.pw-meter { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.12); margin: 6px 0 10px; overflow: hidden; }
.pw-meter > div { height: 100%; width: 0; border-radius: 4px; transition: width 0.25s; background: #ff416c; }
.member-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.member-top { display: flex; align-items: center; gap: 8px; }
.member-top .avatar { width: 28px; height: 28px; font-size: 0.85rem; }
.member-email { flex: 1; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.member-actions select {
    padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3); color: #fff; font-size: 0.8rem;
}
.mini-btn {
    padding: 6px 12px; border-radius: 8px; font-size: 0.78rem; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff;
}
.mini-btn:hover { background: rgba(255,255,255,0.18); }
.mini-btn.danger { border-color: #ff416c; color: #ff6b81; }
.mini-btn.danger:hover { background: rgba(255,65,108,0.2); }
.mini-btn.go { border-color: #2ecc71; color: #2ecc71; }
.mini-btn.go:hover { background: rgba(46,204,113,0.2); }
.mini-btn:disabled { opacity: 0.5; cursor: default; }
.acct-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 1rem; }

/* ---- Modern gear dropdown menu ---- */
.mgmt-menu {
    position: absolute; z-index: 10001; min-width: 250px;
    background: rgba(20, 20, 30, 0.97); border: 1px solid rgba(255,255,255,0.16);
    border-radius: 16px; padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
    animation: mgmtPop 0.16s ease-out;
}
@keyframes mgmtPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.mgmt-item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    background: transparent; border: none; border-radius: 12px;
    padding: 10px 12px; color: #fff; cursor: pointer; text-align: left;
    transition: background 0.15s, transform 0.15s;
}
.mgmt-item:hover { background: rgba(255,255,255,0.1); transform: translateX(2px); }
.mgmt-ico { font-size: 1.5rem; }
.mgmt-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.mgmt-txt b { font-size: 0.95rem; }
.mgmt-txt small { font-size: 0.75rem; color: rgba(255,255,255,0.55); }
.mgmt-arrow { font-size: 1.2rem; color: rgba(255,255,255,0.4); }

/* ---- Chip sign-out menu ---- */
.chip-menu {
    position: absolute; z-index: 10001; min-width: 160px;
    background: rgba(20, 20, 30, 0.97); border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px; padding: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* ---- Management modal tabs ---- */
.mgmt-tabs { display: flex; gap: 8px; margin: 1rem 0; }
.mgmt-tabs .mini-btn { flex: 1; padding: 10px; font-size: 0.9rem; }
.mgmt-tabs .mini-btn:disabled { opacity: 1; border-color: var(--accent-color, #ff9068); color: var(--accent-color, #ff9068); }

/* ---- Account window polish ---- */
.sec-ico { margin-right: 6px; }
.hint {
    font-size: 0.8rem; color: #ffd9a8; background: rgba(255,159,67,0.1);
    border: 1px solid rgba(255,159,67,0.35); border-radius: 10px;
    padding: 8px 12px; margin: 0 0 12px; line-height: 1.5;
}
.protect-note { font-size: 0.78rem; color: #ffd9a8; margin: 6px 0 2px; }
.you-tag { font-size: 0.72rem; color: #8ed6ff; font-weight: bold; }
.role-badge.shield { background: rgba(255,159,67,0.2); color: #ffbe76; border-color: rgba(255,159,67,0.5); }
.pw-rules { list-style: none; margin: 0 0 10px; padding: 0; font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.pw-rules li::before { content: '○ '; }
.pw-rules li.met { color: #2ecc71; }
.pw-rules li.met::before { content: '● '; }
.member-card { transition: border-color 0.2s; }
.member-card:hover { border-color: rgba(255,255,255,0.25); }
.member-actions select:disabled, .member-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 560px) {
    .acct-box { width: 95%; padding: 1rem; }
    .acct-row input, .acct-row select { min-width: 100%; }
    .user-email { display: none; }
}

/* ---- Team (Roles) light design ---- */
.team-modal { color: #2d2a4a; }
.team-head {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    margin: -1.5rem -1.5rem 0; padding: 1rem 1.4rem;
    border-radius: 18px 18px 0 0; color: #fff;
}
.team-title { font-size: 1.15rem; font-weight: bold; }
.team-x {
    width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,0.25); color: #fff; font-size: 0.95rem; line-height: 1;
}
.team-x:hover { background: rgba(255,255,255,0.4); }
.team-desc { font-size: 0.86rem; color: #4b4765; margin: 1rem 0; line-height: 1.55; }
.team-card {
    background: #f4f1ff; border: 1.5px solid #c4b5fd; border-radius: 14px;
    padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.team-card-title { color: #6d28d9; font-weight: bold; margin-bottom: 0.8rem; display: flex; justify-content: space-between; align-items: center; }
.team-lock { background: #fee2e2; border-radius: 8px; padding: 2px 8px; font-size: 0.85rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.team-grid input, .team-grid select {
    padding: 10px 12px; border-radius: 10px; border: 1.5px solid #d8d3f0;
    background: #fff; color: #2d2a4a; font-size: 0.88rem; width: 100%; box-sizing: border-box;
}
.team-grid input::placeholder { color: #a5a0c0; }
.team-grid input:focus, .team-grid select:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.team-grid button {
    padding: 10px 12px; border-radius: 10px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #8b5cf6, #a855f7); color: #fff; font-weight: bold; font-size: 0.9rem;
}
.team-grid button:hover { filter: brightness(1.08); }
.team-grid button:disabled { opacity: 0.55; cursor: default; }
.team-hint { font-size: 0.78rem; color: #6f6a8a; margin: 8px 0 0; line-height: 1.5; }
.team-modal .acct-msg { color: #c2410c; min-height: 1.2em; margin: 6px 0; font-size: 0.85rem; }
.team-modal .acct-msg.ok { color: #15803d; }
.team-modal .acct-msg.err { color: #dc2626; }
.team-modal .member-card { background: #fff; border-color: #ddd6fe; }
.team-modal .member-email { color: #2d2a4a; }
.team-modal .member-email small { color: #6f6a8a; }
.team-modal .member-actions select {
    background: #fff; color: #2d2a4a; border: 1.5px solid #d8d3f0;
}
.team-modal .mini-btn { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
.team-modal .mini-btn:hover { background: #ddd0fb; }
.team-modal .mini-btn.go { background: #dcfce7; border-color: #86efac; color: #15803d; }
.team-modal .mini-btn.danger { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.team-modal .protect-note { color: #b45309; }
.team-modal .you-tag { color: #7c3aed; }
.team-foot { display: flex; justify-content: flex-end; }
.team-signout {
    padding: 9px 22px; border-radius: 10px; border: 1.5px solid #fca5a5;
    background: #fff; color: #b91c1c; cursor: pointer; font-weight: bold;
}
.team-signout:hover { background: #fee2e2; }

