* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #0a0a0a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #f4f4ff;
    overflow-x: hidden;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Loading Skeleton */
.loading-skeleton {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

.skeleton-header {
    height: 80px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    border-bottom: 1px solid #2a2a2a;
}

.skeleton-icon {
    width: 40px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 8px;
    animation: skeleton-pulse 2s ease-in-out infinite alternate;
}

.skeleton-title {
    width: 120px;
    height: 24px;
    background: #2a2a2a;
    border-radius: 4px;
    animation: skeleton-pulse 2s ease-in-out infinite alternate;
}

.skeleton-content {
    flex: 1;
    display: flex;
}

.skeleton-sidebar {
    width: 300px;
    background: #111111;
    border-right: 1px solid #2a2a2a;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-main {
    flex: 1;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-content: start;
}

.skeleton-item {
    height: 60px;
    background: #1a1a1a;
    border-radius: 12px;
    animation: skeleton-pulse 2s ease-in-out infinite alternate;
}

.skeleton-card {
    height: 200px;
    background: #1a1a1a;
    border-radius: 16px;
    animation: skeleton-pulse 2s ease-in-out infinite alternate;
}

.skeleton-doc {
    height: 80px;
    background: #1a1a1a;
    border-radius: 12px;
    margin-bottom: 12px;
    animation: skeleton-pulse 2s ease-in-out infinite alternate;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}
    font-size: 1.1rem;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #2a2a2a;
    border-top: 2px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Database Icon */
.db-icon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.db-icon.small {
    width: 32px;
    height: 32px;
}

.db-icon:not(.small):not(.large) {
    width: 80px;
    height: 80px;
}

.db-icon.large {
    width: 120px;
    height: 120px;
}

.db-cylinder {
    width: 100%;
    height: 70%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border-radius: 50% 50% 16% 16%;
    position: relative;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
    animation: pulse 2s infinite;
}

.db-icon.small .db-cylinder {
    border-radius: 50% 50% 4px 4px;
}

.db-data {
    position: absolute;
    top: 15%;
    left: 20%;
    right: 20%;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    animation: dataFlow 3s infinite;
}

.db-data::before,
.db-data::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1px;
}

.db-data::before {
    top: 12px;
    animation: dataFlow 3s infinite 0.5s;
}

.db-data::after {
    top: 20px;
    animation: dataFlow 3s infinite 1s;
}

.db-icon.small .db-data,
.db-icon.small .db-data::before,
.db-icon.small .db-data::after {
    height: 1px;
}

.db-icon.small .db-data::before {
    top: 3px;
}

.db-icon.small .db-data::after {
    top: 5px;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 12px 48px rgba(168, 85, 247, 0.5);
        transform: scale(1.02);
    }
}

@keyframes dataFlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Auth Gate */
.auth-gate {
    min-height: 100vh;
    background: radial-gradient(circle at top, #121520 0%, #0a0a0a 60%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-container {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.auth-hero {
    margin-bottom: 48px;
}

.auth-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a855f7 50%, #6366f1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin: 24px 0 12px;
}

.auth-tagline {
    font-size: 1.3rem;
    color: #c1c1d8;
    margin-bottom: 8px;
}

.auth-description {
    color: #8b8ba0;
    font-size: 1rem;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 32px;
    background: #fff;
    color: #1f2937;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.google-signin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Main App */
.main-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: rgba(26, 26, 26, 0.8);
    border-bottom: 1px solid #2a2a2a;
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a855f7 50%, #6366f1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-center {
    flex: 1;
    max-width: 500px;
}

.search-controls {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #f4f4ff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.search-btn {
    padding: 10px 12px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-email {
    color: #c1c1d8;
    font-size: 0.9rem;
}

.sign-out-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #c1c1d8;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sign-out-btn:hover {
    border-color: #a855f7;
    color: #a855f7;
}

/* Dashboard Layout */
.dashboard {
    flex: 1;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
}

.dashboard-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Collections Sidebar */
.collections-sidebar {
    width: 280px;
    background: #1a1a1a;
    border-right: 1px solid #2a2a2a;
    padding: 24px;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #a855f7 50%, #6366f1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.refresh-btn {
    padding: 8px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #c1c1d8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    border-color: #a855f7;
    color: #a855f7;
    transform: rotate(90deg);
}

.collections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-item:hover,
.collection-item.active {
    background: rgba(168, 85, 247, 0.1);
    border-color: #a855f7;
    transform: translateY(-1px);
}

.collection-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.collection-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.collection-name {
    font-weight: 500;
    color: #f8f8ff;
}

.collection-count {
    font-size: 0.8rem;
    color: #8b8ba0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.content-section {
    display: none;
}

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

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #a855f7 50%, #6366f1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Overview Section */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.overview-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
}

.overview-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
}

.overview-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.overview-content h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #c1c1d8;
    margin-bottom: 4px;
}

.overview-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f8f8ff;
    margin-bottom: 4px;
}

.overview-content p {
    font-size: 0.85rem;
    color: #8b8ba0;
}

/* Breakdown Section */
.breakdown-section {
    margin-top: 48px;
}

.breakdown-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #f8f8ff;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.breakdown-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.breakdown-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-1px);
}

.breakdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

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

.breakdown-name {
    font-weight: 600;
    color: #f8f8ff;
}

.breakdown-stats {
    display: flex;
    gap: 16px;
}

.breakdown-stat {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #8b8ba0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f8f8ff;
}

/* Collection View */
.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.collection-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.collection-stats {
    display: flex;
    gap: 12px;
}

.stat-badge {
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    font-size: 0.85rem;
    color: #a855f7;
    font-weight: 500;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #c1c1d8;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    border-color: #a855f7;
    color: #a855f7;
}

/* Documents Container */
.documents-container {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
}

.documents-header {
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.view-controls {
    display: flex;
    gap: 12px;
}

.control-select {
    padding: 8px 12px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #f4f4ff;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.control-select:focus {
    border-color: #a855f7;
}

.documents-list {
    min-height: 400px;
    padding: 20px;
}

.loading-documents {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 16px;
    color: #8b8ba0;
}

.document-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.document-card:hover {
    background: rgba(168, 85, 247, 0.05);
    border-color: #a855f7;
    transform: translateY(-1px);
}

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

.document-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #a855f7;
    font-weight: 500;
}

.document-meta {
    font-size: 0.8rem;
    color: #8b8ba0;
}

.document-preview {
    color: #c1c1d8;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
}

.pagination-controls {
    padding: 16px 20px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.page-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #c1c1d8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: #a855f7;
    color: #a855f7;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    color: #8b8ba0;
    font-size: 0.9rem;
}

/* Kenotic Controls */
.kenotic-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.data-age-indicator {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.age-text {
    font-size: 0.9rem;
    color: #8b8ba0;
}

.stale-count {
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 500;
}

.kenotic-actions {
    display: flex;
    gap: 12px;
}

.kenotic-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kenotic-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.kenotic-btn.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #f87171;
    transform: translateY(-1px);
}

.kenotic-btn.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.kenotic-btn.warning:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #fbbf24;
    transform: translateY(-1px);
}

.kenotic-btn.critical {
    background: rgba(185, 28, 28, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(185, 28, 28, 0.4);
}

.kenotic-btn.critical:hover {
    background: rgba(185, 28, 28, 0.3);
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* Stale data highlighting */
.document-card.stale {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.document-card.stale .document-meta {
    opacity: 0.7;
}

.stale-indicator {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    font-size: 0.7rem;
    border-radius: 4px;
    margin-left: 8px;
}

/* Search Section */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.search-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.clear-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #c1c1d8;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.search-results {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 20px;
    min-height: 200px;
}

/* Document Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.document-modal {
    max-width: 900px;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f8f8ff;
}

.close-btn {
    padding: 8px;
    background: transparent;
    border: none;
    color: #8b8ba0;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8f8ff;
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.document-metadata {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}

.metadata-row:last-child {
    border-bottom: none;
}

.metadata-label {
    font-weight: 500;
    color: #c1c1d8;
}

.metadata-value {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #f8f8ff;
    word-break: break-all;
}

.document-data {
    margin-bottom: 24px;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.data-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8f8ff;
}

.format-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #c1c1d8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-btn:hover {
    border-color: #a855f7;
    color: #a855f7;
}

.json-viewer {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: #f8f8ff;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.modal-actions {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    color: #f8f8ff;
}

.action-btn.primary {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #fff;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

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

.toast {
    min-width: 300px;
    padding: 16px 20px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    animation: slideIn 0.3s ease forwards;
    backdrop-filter: blur(16px);
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .collections-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #2a2a2a;
        padding: 16px 24px;
    }
    
    .collections-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
    }
    
    .collection-item {
        min-width: 140px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
        max-width: none;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .documents-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .user-email {
        display: none;
    }
    
    .auth-title {
        font-size: 2.5rem;
    }
    
    .toast-container {
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .modal {
        padding: 16px;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .auth-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-header {
        padding: 16px 16px 0;
    }
    
    .modal-actions {
        padding: 0 16px 16px;
        flex-direction: column;
    }
}