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

:root {
    --bg-color: #f8fafc;
    --panel-bg: #ffffff;
    --text-color: #334155;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --premium: #8b5cf6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-weight: 600;
    color: #0f172a;
}

h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.responsive-title {
    font-size: 2.8rem;
}

p.subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

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

.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

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

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    width: 100%;
    background: #f1f5f9;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    background: #e2e8f0;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.btn-premium {
    background: var(--premium);
    color: white;
    border-color: var(--premium);
}

.btn-premium:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

.error-message {
    background: #fee2e2;
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

/* Header Enhancements */
.site-header {
    background: transparent;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    height: 38px;
}

.logo-badge {
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 70, 229, 0.05);
}

.logo-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.15);
}

.logo-stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 0.8;
}

.logo-top {
    font-size: 1rem;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    text-transform: lowercase;
}

.logo-bottom {
    font-size: 2.5rem;
    font-weight: 800;
    color: #4f46e5;
    font-style: italic;
    letter-spacing: -1.5px;
    text-transform: lowercase;
}

.site-logo {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    max-width: 85%;
    background: white;
    z-index: 9999;
    padding: 1.5rem 1.5rem;
    display: block;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out;
    pointer-events: none;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.mobile-overlay.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-overlay-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 2.5rem;
}

.mobile-close-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #475569;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
}

.mobile-link {
    text-decoration: none;
    color: #475569;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.auth-mobile {
    color: #4f46e5;
    font-weight: 600;
}

.nav-link,
.mobile-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
}

.mobile-link:hover {
    color: var(--primary);
    transform: translateX(6px);
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-link {
    color: #4f46e5;
    font-weight: 500;
}

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

.user-email {
    font-size: 0.9rem;
    color: var(--text-muted);
}

main.dashboard {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 4rem 2rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.2s ease;
    cursor: default;
}

.drop-zone.dragover {
    border: 2px dashed var(--primary) !important;
    background: #eff6ff !important;
}

.drop-zone h3 {
    margin-top: 1rem;
    color: var(--text-color);
}

.drop-zone p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.drop-zone svg {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.item-card {
    position: relative;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.delete-icon-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .delete-icon-btn:hover {
        color: var(--danger);
        background: #fee2e2;
    }
}

.item-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.item-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

.item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.badge-premium {
    background: #f3e8ff;
    color: var(--premium);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    transform: translateY(10px);
    transition: transform 0.2s;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

textarea.form-input {
    resize: vertical;
    min-height: 150px;
}

.air-textarea {
    width: 100%;
    min-height: 250px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    resize: none;
    font-size: 1.1rem;
    color: #000;
    padding: 0;
}

/* Bulk Action Headers */
.action-header-btn {
    background: transparent;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
    transition: opacity 0.2s;
}
@media (hover: hover) and (pointer: fine) {
    .action-header-btn:hover { opacity: 0.7; }
}
@media (max-width: 480px) {
    #bulkActions {
        gap: 0.5rem !important;
        flex-wrap: wrap;
    }
    .action-header-btn {
        font-size: 0.75rem;
        padding: 0.25rem;
        gap: 0.2rem;
    }
    .action-header-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* File UI Redesign Styles */
#filesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    width: 100%;
}

.square-file-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Full-bleed thumbnail cards for images and videos */
.square-file-card.media-card {
    padding: 0;
    overflow: hidden;
    background: #0f172a;
    border: none;
    cursor: pointer;
}

.square-file-card.media-card .media-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 8px;
    pointer-events: none;
    display: block;
}

.square-file-card.media-card .video-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.square-file-card.media-card .media-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 8px 6px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    border-radius: 0 0 8px 8px;
    cursor: pointer;
}

.square-file-card.media-card .kebab-menu {
    color: white;
    background: transparent;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
}

.square-file-card.media-card:hover .kebab-menu {
    opacity: 1;
}


.square-file-card .select-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.85), rgba(79,70,229,0.85));
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 5;
}

.square-file-card.selected .select-overlay {
    display: flex;
}

.square-file-card.selected {
    box-shadow: 0 0 0 2px var(--primary);
}

@media (hover: hover) and (pointer: fine) {
    .square-file-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }
    .square-file-card.selected:hover {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 0 0 2px var(--primary);
    }
}

.square-file-card .item-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.square-file-card .item-title {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.kebab-menu {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-muted);
}
@media (hover: hover) and (pointer: fine) {
    .kebab-menu:not(.media-card .kebab-menu):hover { background: #f1f5f9; color: var(--text-color); }
    .square-file-card.media-card .kebab-menu:hover { background: transparent; color: white; }
}

.dropdown-content {
    position: absolute;
    top: 2rem;
    right: 0.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    width: 140px;
    z-index: 10;
    overflow: hidden;
}
.dropdown-content.active { display: flex; }

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-color);
    text-decoration: none;
    text-align: left;
    background: white;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}
.dropdown-item:last-child { border-bottom: none; }
@media (hover: hover) and (pointer: fine) {
    .dropdown-item:hover { background: #f8fafc; }
}

/* Text Snippet UI */
.text-box-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.text-box-card textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    resize: none;
    font-family: inherit;
    font-size: 0.875rem;
}
.text-box-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Active Upload Box Layout */
.active-upload-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    flex-wrap: wrap;
}

.upload-file-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
    max-width: 300px;
}

.upload-file-card .icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.upload-file-card .details {
    overflow: hidden;
    text-align: left;
}

.upload-file-card .details .name {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file-card .details .status {
    font-size: 0.8rem;
    color: var(--success);
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s;
    color: var(--text-muted);
}

.action-card.upgrade {
    border: 2px solid var(--premium);
    background: #f3e8ff;
    color: var(--premium);
    width: auto;
    padding: 0 1rem;
    text-align: center;
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .action-card:hover {
        border-color: var(--primary);
        background: #eff6ff;
        color: var(--primary);
    }

    .action-card.upgrade:hover {
        background: #e9d5ff;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .desktop-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .logo-bottom {
        font-size: 2rem;
    }

    main.dashboard {
        padding: 1rem;
        gap: 1.5rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .responsive-title {
        font-size: 2rem;
    }

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

    .tabs {
        overflow-x: hidden;
        -ms-overflow-style: none;  
        scrollbar-width: none; 
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
    }
    
    .auth-body {
        padding: 1rem;
    }
    
    .panel {
        padding: 1.5rem;
    }
}

/* Custom Pricing Grid Matching Image */
.pricing-wrapper {
    display: flex;
    justify-content: center;
    max-width: 900px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.08); /* Soft floating container */
    padding: 3rem 0;
}

.pricing-column {
    flex: 1;
    padding: 0 3rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.pricing-column:first-child {
    border-right: 1px solid #f1f5f9;
}

.plan-icon-wrapper {
    width: 64px;
    height: 64px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.plan-icon-wrapper svg {
    width: 28px;
    height: 28px;
    color: #4f46e5;
}

.plan-name {
    font-size: 1.4rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 2.5rem;
}

.plan-price-wrapper {
    display: flex;
    align-items: baseline;
    margin-bottom: 1rem;
}

.plan-price-wrapper .dollar {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.plan-price-wrapper .price {
    font-size: 4.5rem;
    font-weight: 900;
    color: #000;
    line-height: 1;
    letter-spacing: -2px;
}

.plan-price-wrapper .period {
    color: #4f46e5;
    font-weight: 500;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.plan-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    min-height: 48px;
}

.feature-list {
    list-style: none;
    margin-bottom: 3rem;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
}

.check-icon {
    width: 20px;
    height: 20px;
    background: #4f46e5;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-icon svg {
    width: 12px;
    height: 12px;
}

@media (max-width: 1024px) {
    .site-header {
        padding: 1.25rem 1.5rem;
    }

    .desktop-nav {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: block !important;
    }

    .auth-links {
        gap: 0.75rem;
    }

    .logo-bottom {
        font-size: 2.2rem;
    }

    .logo-top {
        font-size: 0.95rem;
    }

    main.dashboard {
        padding: 1.25rem;
        max-width: 95%;
    }

    .pricing-wrapper {
        padding: 2rem 0;
    }

    .pricing-column {
        padding: 2rem;
    }

    .plan-name {
        font-size: 1.3rem;
    }

    .plan-price-wrapper .price {
        font-size: 3.8rem;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .tabs {
        gap: 0.75rem;
    }

    .tab-btn {
        padding: 0.75rem 0.85rem;
    }

    .drop-zone {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;
    }

    .desktop-nav {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: block !important;
    }

    .mobile-overlay {
        width: 100%;
        max-width: 100%;
    }

    .mobile-menu-links {
        gap: 0.75rem;
    }

    .pricing-wrapper {
        flex-direction: column;
        padding: 1.5rem 0;
    }
    .pricing-column {
        padding: 1.5rem;
    }
    .pricing-column:first-child {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }
    
    /* Responsive overrides for small devices */
    main.dashboard {
        padding: 1rem;
        gap: 1.5rem;
    }
    .panel {
        padding: 1.25rem 1rem;
    }
    .responsive-title {
        font-size: 2rem !important;
    }
    .drop-zone {
        padding: 2rem 1rem;
    }
    .square-file-card {
        width: 140px;
        height: 140px;
    }
    .tabs {
        padding: 0;
    }
    .item-card,
    .upload-file-card,
    .text-box-card,
    .modal-content {
        width: 100%;
        max-width: 100%;
    }
    .active-upload-layout {
        flex-direction: column;
        align-items: stretch;
    }
    .upload-file-card {
        min-width: 0;
    }
    .form-input,
    textarea.form-input {
        font-size: 1rem;
    }
    .steps-container {
        gap: 1rem;
    }
    .step-card {
        flex-direction: column;
        align-items: stretch;
    }
    .site-logo {
        height: 34px;
    }
}

/* Legal Pages Styling Elements */
.legal-main {
    display: flex; justify-content: center; align-items: flex-start; padding: 2rem; min-height: 80vh;
}
.legal-panel {
    width: 100%; max-width: 800px; padding: 3rem; background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.legal-header {
    text-align: center; margin-bottom: 3rem;
}
.legal-title {
    color: #000; font-size: 2.5rem; letter-spacing: -1px; margin-bottom: 1rem;
}
.legal-subtitle {
    color: var(--text-muted); font-size: 1.1rem; line-height: 1.6;
}
.legal-content {
    font-size: 1rem; color: #334155; line-height: 1.8; display: flex; flex-direction: column; gap: 2rem;
}
.legal-section-title {
    color: var(--primary); font-size: 1.4rem; margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .legal-main { padding: 1rem; }
    .legal-panel { padding: 1.5rem; border-radius: 8px;}
    .legal-header { margin-bottom: 1.5rem; }
    .legal-title { font-size: 1.8rem; margin-bottom: 0.5rem; }
    .legal-subtitle { font-size: 0.95rem; line-height: 1.4; }
    .legal-content { font-size: 0.95rem; gap: 1.5rem; }
    .legal-section-title { font-size: 1.2rem; margin-bottom: 0.5rem; }
}

/* Inline Email Share */
.inline-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin-left: 0.5rem;
}
.inline-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.inline-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: 0.2s;
    border-radius: 22px;
}
.inline-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}
.inline-toggle input:checked + .inline-slider {
    background-color: #3a2ee0;
}
.inline-toggle input:checked + .inline-slider:before {
    transform: translateX(18px);
}

.chip-input-wrap::-webkit-scrollbar {
    display: none;
}
.chip-input-wrap {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.email-chip {
    background: #3a2ee0;
    color: white;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.email-chip .remove-chip {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
}
.email-chip .remove-chip:hover {
    opacity: 1;
}

/* Inline Share Row — Mobile */
@media (max-width: 640px) {
    #inlineChipWrap {
        flex: 1 !important;
        min-width: 0 !important;
    }

    #inlineEmailInput {
        min-width: 0 !important;
        width: 100%;
    }

    #inlineSendBtn {
        flex-shrink: 0;
    }
}

