:root {
    --bg-dark: #0a0f18;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #00ff88;
    --secondary: #0055ff;
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --danger: #ff4d4d;
    --glass: rgba(255, 255, 255, 0.02);
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent white background on active/focus for all interactive elements */
tr:active,
tr:active td,
tr:focus,
tr:focus td,
.log-item:active,
.task-item:active,
.base-item:active,
.option-btn:active,
.msg-bubble:active {
    background: rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

::selection {
    background: var(--secondary);
    color: white;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.mobile-header,
.record-container-mobile,
.mobile-only-spacer,
#chat-fab {
    display: none;
}

/* Login logic */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a2333 0%, #0a0f18 100%);
    display: none;
    /* [FIX] Oculto por defecto para evitar parpadeo */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-box {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    padding: 40px 30px;
    border-radius: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.login-box h1 {
    margin-bottom: 25px;
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
}

.login-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 16px;
    border-radius: 14px;
    color: white;
    margin-bottom: 15px;
    outline: none;
    font-size: 16px;
}

#login-btn {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.download-btn {
    display: none;
    /* Hidden by default, shown via JS */
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--primary);
    background: rgba(0, 255, 136, 0.05);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 14px;
}

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

.download-btn i {
    font-size: 18px;
    font-style: normal;
}

.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    padding-right: 50px !important;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    padding: 0;
    margin-bottom: 15px;
    /* Offset for input margin */
}

.password-container .toggle-password {
    top: 40%;
    /* Adjusted for input marginBottom */
}

/* Layout Main */
#app-content {
    display: none;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar (Desktop) */
aside {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 100;
    overflow-y: auto;
    max-height: 100vh;
    width: 260px !important;
    flex-shrink: 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo i {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary);
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

nav li {
    padding: 14px 20px;
    border-radius: 14px;
    cursor: pointer;
    color: var(--text-dim);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
}

nav li.active {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.1), transparent);
    border-left: 4px solid var(--primary);
    color: #fff;
}

/* Main Content */
main {
    padding: 30px;
    padding-bottom: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.section-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 24px;
}

.section-card h2 {
    font-size: 11px;
    margin-bottom: 15px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.section-card h2::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.5;
    transition: 0.3s;
}

.section-card.collapsed h2::after {
    transform: rotate(-90deg);
}

.section-card.collapsed>*:not(.card-header):not(h2) {
    display: none !important;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.section-card.collapsed .card-header {
    margin-bottom: 0;
}

#exit-zen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 20px;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 11px;
    z-index: 1000;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

#exit-zen-btn:hover {
    background: var(--primary);
    color: #000;
}

/* Calendar Styling */
#calendar {
    min-height: 450px;
}

.fc {
    --fc-border-color: rgba(255, 255, 255, 0.05);
}

.fc-theme-standard .fc-scrollgrid {
    border: none;
}

.fc-toolbar-title {
    font-size: 16px !important;
}

.fc-button {
    padding: 6px 12px !important;
    font-size: 13px !important;
    text-transform: capitalize !important;
}

.fc-col-header-cell-cushion {
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: block !important;
    padding: 8px 0 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
}

.fc-col-header {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Calendar Selection & Focus Fixes for Mobile */
.fc-event:focus,
.fc-event:active,
.fc-event:hover {
    outline: none !important;
    box-shadow: none !important;
    filter: brightness(1.2);
    /* Subtle highlight instead of white background */
}

/* Prevent default white selection background in FullCalendar */
.fc-v-event,
.fc-h-event {
    border: 1px solid var(--card-border) !important;
}

.fc-event-selected,
.fc-event-selected::after {
    background: rgba(255, 255, 255, 0.1) !important;
}

.fc-event-main {
    color: #ffffff !important;
}

/* Highlight the 'current time' line more clearly */
.fc-timegrid-now-indicator-line {
    border-color: var(--primary) !important;
    border-width: 2px !important;
}

/* FullCalendar List View Dark Mode Fixes */
.fc-list {
    background: transparent !important;
    border: none !important;
}

.fc-list-day-cushion {
    background: rgba(255, 255, 255, 0.05) !important;
}

.fc-list-event:hover td {
    background: rgba(255, 255, 255, 0.1) !important;
}

.fc-list-day-text,
.fc-list-day-side-text {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 11px;
}

.fc-list-event-title a {
    color: #fff !important;
    text-decoration: none !important;
}

.fc-list-event-time {
    color: var(--text-dim) !important;
}

.fc-list-empty {
    background: transparent !important;
    color: var(--text-dim) !important;
}

/* Chart */
#timeChart {
    max-height: 220px;
    width: 100% !important;
}

/* Strategist Side - Floating Chat Panel */
.strategist-side {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 370px;
    max-height: 75vh;
    background: rgba(10, 15, 24, 0.97);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 25px 22px 20px;
    display: none;
    flex-direction: column;
    z-index: 2000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.strategist-side.open {
    display: flex;
}

/* FAB Chat Bubble */
#chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    font-size: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.35);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.5);
}


#chat-msgs {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.chat-msg {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word;
}

.msg-bot {
    background: var(--card-bg);
    align-self: flex-start;
    border: 1px solid var(--card-border);
    border-bottom-left-radius: 2px;
}

.msg-user {
    background: var(--secondary);
    align-self: flex-end;
    color: white;
    border-bottom-right-radius: 2px;
}

/* Buttons & Mobile FAB */
#record-btn {
    width: 100%;
    padding: 20px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    transition: 0.3s;
}

#record-btn:active {
    transform: scale(0.95);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 24px;
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal-btn:hover {
    color: white;
}

.table-tab {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions {
    display: none;
    gap: 6px;
}

.table-tab:hover .table-actions {
    display: flex;
}

.modal-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.option-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 25px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.option-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.05);
}

.option-btn i {
    font-size: 28px;
}

.option-btn span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.text-input-area {
    display: none;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.text-input-area textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 15px;
    border-radius: 14px;
    color: white;
    outline: none;
    font-size: 16px;
    resize: none;
    height: 100px;
}

.btn-confirm {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

#record-btn.recording {
    background: var(--danger);
    box-shadow: 0 0 30px var(--danger);
    animation: pulse 1s infinite;
    color: white;
}

/* Desktop Header Info */
.efficiency-score {
    text-align: right;
}

/* Mobile Specific Overwrites */
@media (max-width: 900px) {
    #app-content {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
        display: none;
    }

    /* Set to display:block via JS */
    #app-content.active {
        display: block;
    }

    aside {
        display: none;
    }

    /* We will use a mobile header */
    .strategist-side {
        display: none;
    }

    /* Toggleable chat */

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

    /* Mobile Top Bar */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        position: sticky;
        top: 0;
        z-index: 500;
        border-bottom: 1px solid var(--card-border);
    }

    .mobile-header .logo {
        margin: 0;
        font-size: 20px;
    }

    /* Record FAB for Mobile */
    .record-container-mobile {
        position: fixed;
        bottom: 30px;
        left: 20px;
        width: calc(100% - 100px);
        max-width: 300px;
        z-index: 600;
    }

    /* AI Bubble for Mobile [NEW] */
    #chat-fab {
        display: none;
        position: fixed;
        bottom: 30px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: var(--primary);
        color: #000;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
        z-index: 1001;
        cursor: pointer;
    }

    .strategist-side.mobile-open {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 2000;
        background: #0a0f18 !important;
        padding: 20px;
    }

    #chat-fab {
        display: flex;
    }

    main {
        padding: 20px;
        padding-bottom: 500px;
        margin-bottom: 500px;
    }

    header {
        flex-direction: column;
        gap: 15px;
    }

    .efficiency-score {
        text-align: left;
        background: var(--card-bg);
        padding: 15px;
        border-radius: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #calendar {
        min-height: 400px;
        height: auto !important;
    }

    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .modal-content {
        padding: 20px 15px;
    }
}

@media (min-width: 901px) {

    .mobile-header,
    .record-container-mobile {
        display: none;
    }

    #app-content.active {
        display: grid !important;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.pulse-small {
    animation: pulse 1s infinite;
    border-color: var(--danger) !important;
}

.pulse-small {
    animation: pulse 1s infinite;
    border-color: var(--danger) !important;
}

/* Sidebar Scrollbar Styling */
aside::-webkit-scrollbar {
    width: 4px;
}

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

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

aside::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Google Login Button */
.google-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* Utility */
/* Impact Board Aesthetics */
.impact-board table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: 13px;
}

.impact-board th {
    text-align: left;
    padding: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
}

.impact-board td {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
}

.impact-board tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.status-cell {
    color: white;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
    min-width: 100px;
    font-size: 11px;
    padding: 10px !important;
}

.status-todo {
    background: #c4c4c4;
}

.status-working {
    background: #fdab3d;
}

.status-stuck {
    background: #e2445c;
}

.status-done {
    background: #00ca72;
}

.priority-cell {
    color: white;
    text-align: center;
    border-radius: 4px;
    font-size: 11px;
    padding: 6px !important;
    width: 80px;
}

.p-critical {
    background: #ff007f;
}

.p-high {
    background: #ff7e00;
}

.p-medium {
    background: #ffcb00;
}

.p-low {
    background: #579bfc;
}

.category-tag {
    background: rgba(0, 85, 255, 0.1);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    border: 1px solid rgba(0, 85, 255, 0.2);
}

/* Group Chat Styles */
.group-item {
    padding: 15px;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    transition: 0.2s;
}

.group-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.group-item.active {
    background: rgba(0, 85, 255, 0.1);
    border-left: 3px solid var(--primary);
}

.group-item h4 {
    margin: 0;
    font-size: 13px;
    color: var(--secondary);
}

.group-item p {
    margin: 5px 0 0;
    font-size: 11px;
    color: var(--text-dim);
}

.msg-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 13px;
    position: relative;
    line-height: 1.4;
}

.msg-self {
    align-self: flex-end;
    background: var(--primary);
    color: #000;
    border-bottom-right-radius: 2px;
}

.msg-other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-bottom-left-radius: 2px;
}

.msg-author {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.7;
}

.msg-time {
    font-size: 9px;
    margin-top: 4px;
    opacity: 0.6;
    text-align: right;
}

.msg-img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 5px;
    display: block;
}

/* Professional Gadgets CSS */
.habit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.habit-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 5px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.habit-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

.habit-item.completed {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.habit-icon {
    font-size: 20px;
}

.habit-name {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-dim);
    text-align: center;
}

.habit-item.completed .habit-name {
    color: var(--primary);
}

.pomodoro-card {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.1) 0%, rgba(255, 85, 0, 0.05) 100%) !important;
    border: 1px solid rgba(255, 0, 85, 0.2) !important;
}

.timer-display {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin: 10px 0;
    font-family: 'Space Mono', monospace;
    color: var(--danger);
    text-shadow: 0 0 20px rgba(255, 0, 85, 0.3);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.goal-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.goal-objective {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: 0.5s ease;
}

.progress-label {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
}

/* pulse animation for recording */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

@keyframes pulse-red {
    0% {
        background-color: rgba(255, 0, 0, 0.2);
    }

    50% {
        background-color: rgba(255, 0, 0, 0.6);
    }

    100% {
        background-color: rgba(255, 0, 0, 0.2);
    }
}

#alarm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: pulse-red 1s infinite;
    color: white;
    text-align: center;
}

/* Airtable Grid Specific Styles */
#airtable-grid th {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 10px;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    text-align: left;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

#airtable-grid td {
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    font-size: 13px;
    color: #fff;
    background: transparent;
    min-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#airtable-grid tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

#airtable-grid td.editable:focus {
    background: rgba(0, 255, 136, 0.1) !important;
    outline: 2px solid var(--primary);
}

.base-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 5px;
}

.base-actions {
    display: none;
    gap: 8px;
    margin-left: auto;
}

.base-item:hover .base-actions {
    display: flex;
}

.action-icon {
    opacity: 0.6;
    transition: 0.2s;
    font-size: 12px;
}

.action-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.base-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.base-item.active {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.base-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.table-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    white-space: nowrap;
}

.table-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.table-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(0, 255, 136, 0.05);
}

#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 255, 136, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), toast-out 0.4s 2.6s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}