/* ═══════════════════════════════════════════════════════════
   Starred Files Page — Matches Shared Page Theme
   ═══════════════════════════════════════════════════════════ */

.starred-workspace-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Container for starred files / empty state */
.starred-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* When empty state is present, center it */
.starred-container:has(.starred-empty) {
    align-items: center;
}

.starred-container:has(.starred-files-grid) {
    align-items: stretch;
}

.starred-top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 24px 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

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

.starred-toolbar-left h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.starred-toolbar-left h2 i {
    color: #f59e0b;
    font-size: 18px;
}

.starred-badge-count {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.starred-toolbar-center {
    flex: 1;
    max-width: 420px;
}

.starred-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.starred-search-box i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.starred-search-box input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 34px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.starred-search-box input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.starred-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.starred-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 14px;
}

.starred-btn-icon:hover {
    background: #f1f5f9;
    border-color: #2563eb;
    color: #2563eb;
}

.starred-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.starred-file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.starred-file-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.starred-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f5f9;
    font-size: 20px;
}

.starred-file-info {
    flex: 1;
    min-width: 0;
}

.starred-file-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.starred-file-meta {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.starred-file-star {
    color: #f59e0b;
    font-size: 14px;
    flex-shrink: 0;
}

.starred-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
    color: #64748b;
}


#starredContainer .starred-empty,
.starred-container .starred-empty,
.starred-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 80px 20px !important;
    text-align: center !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    margin: 20px auto !important;
    width: 100% !important;
    max-width: 720px !important;
    box-sizing: border-box !important;
}

#starredContainer .starred-empty > *,
.starred-empty > * {
    text-align: center !important;
}

.starred-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 32px;
    color: #3b82f6;
}

.starred-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.starred-empty p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    max-width: 400px;
}

@media (max-width: 768px) {
    .starred-top-toolbar { flex-direction: column; align-items: stretch; }
    .starred-files-grid { grid-template-columns: 1fr; }
}

/* ✅ Remove top padding override */
body:has(.starred-workspace-wrapper) .main-content {
    padding-top: 0 !important;
}

/* --- Dark Mode Batch 1 --- */

[data-theme="dark"] .starred-item, body.dark-mode .starred-item { background: #111827 !important; border-color: #1f2937 !important; color: #f9fafb !important; }
