/* Shared page shell — reset, body background, sidebar, tab navigation, main content area. */

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

body {
    font-family: var(--font-fa), var(--font-en);
    background: radial-gradient(circle at 10% 0%, #f2f3fc 0%, var(--bg-1) 45%, var(--bg-2) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--ink);
    direction: rtl;
}

::-webkit-scrollbar { width: 8px; height: 8px; }

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

::-webkit-scrollbar-thumb { background: rgba(48,53,144,0.35); border-radius: var(--radius-xs); }

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--sidebar-1), var(--sidebar-2));
    border-radius: var(--radius);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 20px;
    color: var(--sidebar-text);
    box-shadow: 0 24px 48px rgba(15,16,35,0.28);
    max-height: calc(100vh - 40px);
}

.sidebar-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 8px 18px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.08); }

.logo-mark { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: contain; background: #ffffff; padding: 5px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }

.sidebar-logo .logo-text { width: 100%; }

.sidebar-logo .logo-text h1 { font-size: 0.72rem; font-weight: 800; color: var(--sidebar-text); line-height: 1.4; white-space: nowrap; }

.sidebar-logo .logo-text span { font-size: 0.6rem; color: var(--sidebar-dim); white-space: nowrap; }

.today-display { background: rgba(255,255,255,0.06); color: var(--sidebar-dim); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.7rem; font-weight: 700; text-align: center; }

.sidebar-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.tabs { display: flex; flex-direction: column; gap: 5px; }

.tab {
    text-align: right;
    background: rgba(255,255,255,0.04);
    color: var(--sidebar-dim);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: 0.2s ease;
}

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

.tab.active { background: linear-gradient(135deg, var(--purple), var(--purple-light)); color: #fff; box-shadow: 0 8px 18px rgba(48,53,144,0.4); }

.tab-content { display: none; animation: fadeIn 0.2s ease; }

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

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
    .container, .app-shell { flex-direction: column; }
    .sidebar { width: 100%; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
    .sidebar-logo { border-bottom: none; margin-bottom: 0; padding: 4px; }
    .tabs { flex-direction: row; }
    .sidebar-actions { margin-top: 0; flex-direction: row; border-top: none; padding-top: 0; }
}
