/* Admin Dashboard Styles - Version A (Light Theme Match) */

/* Imports & Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors (Matching Index) */
    --brand-cyan: #3DC2FF;
    --brand-purple: #A855F7;
    --brand-pink: #FF3D71;
    --brand-gradient: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-purple) 50%, var(--brand-pink) 100%);

    /* Layout Colors (Light Theme) */
    --sidebar-bg: #FFFFFF;
    --sidebar-text: #4B5563;
    /* Gray-600 */
    --sidebar-active-bg: #FAF5FF;
    /* Purple-50 */
    --sidebar-active-text: #7E22CE;
    /* Purple-700 */

    --bg-page: #F9FAFB;
    /* Gray-50 */
    --bg-card: #FFFFFF;

    --text-main: #111827;
    /* Gray-900 */
    --text-muted: #6B7280;
    /* Gray-500 */

    --border-light: #E5E7EB;
    /* Gray-200 */

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar (Light Style) */
.app-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-right: 1px solid var(--border-light);
    transition: width 0.3s;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none;
    letter-spacing: -0.025em;
}

/* Logo icon matching brand gradient */
.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--brand-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 6px -1px rgba(168, 85, 247, 0.2);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: #F3F4F6;
    color: var(--text-main);
}

.nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1.5rem 0;
}

/* Main Content */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 6px 12px 6px 6px;
    border-radius: 50px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: shadow 0.2s;
}

.user-menu:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 36px;
    height: 36px;
    /* Use brand gradient for avatar */
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid white;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle shadow like index */
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover effects matching index cards */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #D1D5DB;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: -0.01em;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.employee-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Stats */
.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin: 0.75rem 0;
    letter-spacing: -0.03em;
    /* Tighter tracking for big numbers */
}

.stat-trend {
    font-size: 0.875rem;
    font-weight: 500;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* Tables - Clean & Airy */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #F9FAFB;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-main);
    font-size: 0.95rem;
}

.data-table tr:hover {
    background: #F9FAFB;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: #DCFCE7;
    color: #166534;
}

/* Green-100 / Green-800 */
.status-pending {
    background: #FEF3C7;
    color: #B45309;
}

/* Amber-100 / Amber-700 */
.status-inactive {
    background: #F3F4F6;
    color: #4B5563;
}

/* Gray-100 / Gray-600 */


/* Buttons - Strict Match */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    /* Pill buttons like index */
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.39);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(168, 85, 247, 0.45);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
    /* Explicitly full width */
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    /* Bold labels */
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border 0.2s, box-shadow 0.2s;
    background: #F9FAFB;
}

.form-control:focus {
    outline: none;
    background: white;
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Inputs on white cards should have contrast */
.card .form-control {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
}


/* Feed Items */
.feed-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.feed-icon {
    width: 40px;
    height: 40px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Utilities */
.section-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section-view.active {
    display: block;
}

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

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

/* Phone Mockup - Match Index */
.phone-preview {
    background: #F9FAFB;
    border-radius: 32px;
    padding: 16px;
    border: 6px solid #E5E7EB;
    max-width: 300px;
    margin: 0 auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.phone-screen {
    background: white;
    border-radius: 20px;
    min-height: 420px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.msg-bubble-out {
    background: #F3F4F6;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    max-width: 85%;
    color: var(--text-main);
}

.msg-bubble-in {
    /* Brand Gradient for user messages */
    background: var(--brand-gradient);
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    max-width: 85%;
    margin-left: auto;
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.2);
}

/* Phone Preview with Real Image */
.phone-real-container {
    position: relative;
    width: 300px;
    /* Increased scale (~7%) */
    height: 608px;
    /* Aspect ratio maintained */
    margin: 0 auto;
}

.phone-frame-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.phone-screen-content {
    box-sizing: content-box;
    /* Restore size logic after global reset */
    position: absolute;
    /* Positioned below the header in the new iPhone image */
    width: 73%;
    height: 65%;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    z-index: 15;
    /* Must be above phone-frame-img (z-index:10) so messages render on screen */
    padding: 10px 16px 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Adjustments for the bubble inside this container */
.phone-screen-content .msg-bubble-out,
.phone-screen-content .msg-bubble-in {
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 8px;
    max-width: 90%;
    border-radius: 16px;
}

.phone-screen-content .msg-bubble-out {
    border-bottom-left-radius: 4px;
}

.phone-screen-content .msg-bubble-in {
    border-bottom-right-radius: 4px;
}

.preview-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.preview-column h3 {
    /* No margin tricks needed — content stacks top to bottom */
}

/* Stretch the form card to fill grid height */
.column-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.column-form .card {
    height: 100%;
    margin-bottom: 0;
    /* Override default card margin to align perfectly */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Campaign Cards (Active & Scheduled) --- */
.campaign-card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: #FAFAFA;
}

.campaign-card:last-child {
    margin-bottom: 0;
}

.campaign-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.campaign-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.campaign-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.campaign-card-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.campaign-card-stat {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.campaign-card-stat strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 2px;
}

.campaign-progress-bar-wrap {
    background: #E5E7EB;
    border-radius: 4px;
    height: 5px;
    margin-bottom: 14px;
}

.campaign-progress-bar {
    background: var(--brand-gradient);
    height: 5px;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.campaign-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Message Queue Panel --- */
.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.queue-num {
    width: 22px;
    height: 22px;
    background: var(--brand-gradient);
    color: white;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.queue-text {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.queue-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-edit-btn {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.queue-edit-btn:hover {
    background: #E5E7EB;
    color: #374151;
}

.queue-source-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    font-weight: 500;
}

.queue-source-library {
    background: #EFF6FF;
    color: #1D4ED8;
}

.queue-source-custom {
    background: #F0FDF4;
    color: #166534;
}

.queue-edited-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 20px;
    background: #FEF3C7;
    color: #92400E;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status badge variants */
.status-badge.status-warning {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.status-info {
    background: #E0F2FE;
    color: #075985;
}

/* --- Campaign Library Buttons (global — must NOT be inside a media query) --- */
.output-btn {
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid var(--border-light);
    position: relative;
}

.output-btn:hover {
    border-color: var(--brand-purple);
    background: #F3F4F6;
}

.output-btn.active {
    background: var(--brand-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
    font-weight: 600;
}

/* Checkmark badge on selected library buttons */
.output-btn.active::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    background: #7C3AED;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    /* Layout */
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .app-main {
        padding: 1rem;
        margin-left: 0;
        /* No sidebar offset */
        width: 100%;
    }

    /* Grids - Force single column on mobile */
    .grid-3,
    .grid-2,
    .employee-form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Extra specificity for employee form grid */
    #view-employees .employee-form-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }

    /* Extra specificity for campaign grid-2 */
    #view-campaigns .grid-2 {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }

    /* Topbar */
    .topbar {
        gap: 1rem;
        flex-wrap: nowrap;
    }

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

    /* Show Toggle (We'll add class logic in HTML) */
    .mobile-menu-btn {
        display: block !important;
    }

    /* User Menu - Fix mobile layout */
    .user-menu {
        padding: 4px 8px 4px 4px;
        gap: 8px;
        min-width: 0;
        flex-shrink: 0;
    }

    .user-menu>div:nth-child(2) {
        display: none;
        /* Hide name text on very small screens */
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .user-menu>span {
        font-size: 0.5rem !important;
    }

    /* Cards */
    .card {
        padding: 1rem;
        box-sizing: border-box;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
        overflow-y: visible;
    }

    .card>* {
        max-width: 100%;
    }

    /* Global form-control fix - percentage based */
    .form-control {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    .form-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
    }

    /* Phone Preview on Mobile */
    .preview-column {
        height: auto;
        margin-top: 2rem;
    }

    .phone-real-container {
        /* Scale down for mobile if needed, or keep centered */
        transform: scale(0.9);
        transform-origin: top center;
        margin-bottom: -60px;
        /* Compensate for blank space if scaled */
    }

    /* Employee Add Form - Simple and clean */
    #view-employees .employee-form-grid>div {
        width: 100%;
    }

    #view-employees .card button {
        width: 100%;
        margin-top: 8px;
    }

    /* Clean percentage-based approach for all inputs */
    #view-employees input,
    #view-employees select,
    #view-employees textarea,
    #view-campaigns input,
    #view-campaigns select,
    #view-campaigns textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    /* Date inputs specific - aggressive containment */
    #view-employees input[type="date"],
    #view-campaigns input[type="date"] {
        width: 100% !important;
        max-width: 100% !important;
        /* Reverted back to 100% so we cleanly fill the parent group, which is now constrained */
        box-sizing: border-box !important;
        padding: 8px 10px !important;
        /* Reduced padding on mobile */
        min-width: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    /* Ensure form groups are flexible containers */
    #view-employees .form-group,
    #view-campaigns .form-group {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Ensure grid containers respect bounds */
    #view-employees .employee-form-grid,
    #view-campaigns .grid-2 {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure cards containing forms have proper constraints */
    #view-employees .card,
    #view-campaigns .card {
        padding: 1rem !important;
        overflow-x: hidden !important;
    }

    /* Employee search/filter - stack vertically */
    #view-employees .card>div[style*="justify-content:space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #view-employees .card>div[style*="justify-content:space-between"]>div {
        width: 100% !important;
        flex-direction: column !important;
    }

    #view-employees #employee-search,
    #view-employees #status-filter {
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    /* Employee List - Mobile-friendly card layout */
    #employee-table-body tr {
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #E5E7EB !important;
        border-radius: 8px !important;
        margin-bottom: 12px !important;
        padding: 12px !important;
        background: white !important;
    }

    #employee-table-body td {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 6px 0 !important;
        border: none !important;
    }

    #employee-table-body td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #6B7280;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    #employee-table-body td:nth-child(1):before {
        content: "Team Member";
    }

    #employee-table-body td:nth-child(2):before {
        content: "Phone";
    }

    #employee-table-body td:nth-child(3):before {
        content: "Status";
    }

    #employee-table-body td:nth-child(4) {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    #employee-table-body td:nth-child(4):before {
        content: "Actions";
        width: 100%;
    }

    #employee-table-body td:nth-child(4) button {
        flex: 1 !important;
        min-width: fit-content !important;
    }

    table thead {
        display: none !important;
    }

    /* Campaign Create Form - .grid-2 already handled globally */
    #view-campaigns .grid-2>div {
        width: 100%;
    }

    /* Campaign Cards - Better mobile layout */
    .campaign-card {
        margin-bottom: 16px !important;
    }

    .campaign-card-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .campaign-card-stat {
        font-size: 0.85rem !important;
    }

    .campaign-card-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .campaign-card-actions button {
        width: 100% !important;
    }

    /* Analytics - Stack all cards vertically */
    #view-analytics .grid-3,
    #view-analytics .grid-2 {
        grid-template-columns: 1fr !important;
    }

    /* Analytics charts row - force single column */
    #view-analytics>div[style*="grid-template-columns: 2fr 1fr"],
    #view-analytics>div[style*="grid-template-columns:2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* All analytics grids should be single column on mobile */
    #view-analytics [style*="display: grid"],
    #view-analytics [style*="display:grid"] {
        grid-template-columns: 1fr !important;
    }

    /* Superadmin - Stack action buttons vertically */
    #admin-list-body td button,
    table td button {
        display: block !important;
        width: 100% !important;
        margin: 4px 0 !important;
    }
}

/* --- Mobile Backdrop --- */
.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border-left: 4px solid var(--brand-purple);
    animation: slideIn 0.3s ease forwards;
    transform: translateX(100%);
    opacity: 0;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-content {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}