/* هوية مكتب تقاريرك — وثيقة رسمية فاتحة */
:root {
    --ink: #1a2744;
    --gold: #c4a35a;
    --gold-soft: #e8d9a8;
    --paper: #f7f4ee;
    --sheet: #fffdf8;
    --line: rgba(26, 39, 68, 0.12);
    --muted: #5c6578;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.office-body {
    font-family: 'Tajawal', sans-serif;
    background:
        radial-gradient(ellipse at 12% 0%, rgba(196, 163, 90, 0.13), transparent 46%),
        linear-gradient(180deg, #f3efe6 0%, var(--paper) 42%, #efeae0 100%);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.7;
}

.office-wrap { max-width: 980px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }

.office-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.office-brand {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.22rem;
    color: var(--ink);
    text-decoration: none;
}
.office-brand span { color: var(--gold); }

.office-nav { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.office-nav a {
    text-decoration: none;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--line);
    background: var(--sheet);
}
.office-nav a:hover,
.office-nav a.is-active { border-color: var(--gold); background: #fff; }

.office-page-head h1 {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.35rem;
}
.office-page-head p { color: var(--muted); max-width: 36rem; margin-bottom: 1.1rem; }
.office-greet {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gold);
    margin-bottom: 0.35rem !important;
}

.office-recent-list { display: grid; gap: 0.55rem; }
.office-recent-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.9);
}
.office-recent-item strong { display: block; font-size: 0.95rem; }
.office-recent-item span { color: var(--muted); font-size: 0.8rem; }
.office-recent-actions { display: flex; gap: 0.4rem; }
.office-recent-actions a {
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--line);
}
.office-recent-actions a:hover { border-color: var(--gold); }

.office-week {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}
.office-week-card {
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0.75rem 0.85rem;
    transition: border-color 0.2s, transform 0.15s;
}
.office-week-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.office-week-card.is-today {
    border-color: var(--gold);
    background: #fff8e8;
    box-shadow: inset 3px 0 0 var(--gold);
}
.office-week-card .d {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.office-week-card strong {
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    line-height: 1.45;
}
@media (max-width: 700px) {
    .office-week { grid-template-columns: 1fr; }
}

.office-search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.85rem;
}
.office-search i { color: var(--gold); }
.office-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
}

.office-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.4rem;
}
.office-chip {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.office-chip:hover { border-color: var(--gold); color: var(--ink); }
.office-chip.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.office-group { margin-bottom: 2rem; }
.office-group-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--gold-soft);
    display: inline-block;
}

.office-cards { display: grid; gap: 0.85rem; }
.office-card {
    background: var(--sheet);
    border: 1px solid var(--line);
    padding: 1rem 1.1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: start;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}
.office-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.office-card.is-soon { opacity: 0.88; }
.office-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    background: rgba(26, 39, 68, 0.06);
    font-size: 1.1rem;
}
.office-card h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}
.office-card p { color: var(--muted); font-size: 0.92rem; }
.office-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.45rem;
}
.office-card-tags span {
    font-size: 0.72rem;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 0.1rem 0.4rem;
}

.office-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--line);
    white-space: nowrap;
}
.office-badge.ready { color: #1a5c3a; border-color: #a8d5bc; background: #eef8f2; }
.office-badge.soon { color: #7a5c12; border-color: var(--gold-soft); background: #fbf6e8; }

.office-empty { display: none; text-align: center; color: var(--muted); padding: 2rem; }
.office-empty.show { display: block; }

.office-note {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    background: rgba(26, 39, 68, 0.04);
    border: 1px dashed var(--line);
    font-size: 0.92rem;
    color: var(--muted);
}
.office-note a { color: var(--ink); font-weight: 700; }

.office-suggest {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-right: 4px solid var(--gold);
    padding: 1rem 1.15rem;
    margin-bottom: 1.15rem;
}
.office-suggest strong { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.office-suggest p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.7rem; }

.office-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.55rem 0.95rem;
    border: 0;
    cursor: pointer;
}
.office-btn-ink { background: var(--ink); color: #fff; }
.office-btn-gold { background: var(--gold); color: var(--ink); }
.office-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.office-cover {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink);
    padding: 1.75rem 1.5rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 12px 40px rgba(26, 39, 68, 0.06);
    position: relative;
}
.office-cover::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid var(--gold-soft);
    pointer-events: none;
}
.office-cover h1 {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    position: relative;
    margin-bottom: 0.4rem;
}
.office-cover .meta { color: var(--muted); font-size: 0.95rem; position: relative; }
.office-cover .gold-rule {
    height: 2px;
    width: 4rem;
    background: var(--gold);
    margin: 1rem 0;
    position: relative;
}

.office-panel {
    background: var(--sheet);
    border: 1px solid var(--line);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}
.office-panel h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.office-countdown {
    font-family: 'Cairo', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.1;
}

.office-progress {
    height: 8px;
    background: rgba(26, 39, 68, 0.08);
    margin-top: 0.6rem;
    overflow: hidden;
}
.office-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ink), var(--gold));
}

.office-timeline {
    list-style: none;
    border-right: 2px solid var(--gold-soft);
    padding-right: 1rem;
    margin-right: 0.35rem;
}
.office-timeline li { position: relative; padding: 0.65rem 0; }
.office-timeline li::before {
    content: '';
    position: absolute;
    right: -1.35rem;
    top: 1.1rem;
    width: 10px;
    height: 10px;
    background: var(--ink);
    border: 2px solid var(--gold);
    border-radius: 50%;
}
.office-timeline .date { font-size: 0.82rem; color: var(--muted); }
.office-timeline .title { font-weight: 700; }

.office-placeholder { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.office-placeholder i {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: block;
}

.office-hijri-note {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--line);
}

.office-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    margin-top: 0.75rem;
}
.office-month .dow {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    padding: 0.25rem 0;
}
.office-month .day {
    text-align: center;
    font-size: 0.85rem;
    padding: 0.45rem 0;
    border: 1px solid transparent;
    background: rgba(26, 39, 68, 0.03);
    font-variant-numeric: tabular-nums;
}
.office-month .day.is-today {
    border-color: var(--gold);
    background: #fff8e8;
    font-weight: 800;
}
.office-month .day.is-empty { background: transparent; }

.hidden { display: none !important; }

/* حركات خفيفة — هوية وثيقة لا SaaS */
@keyframes officeFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.office-cover,
.office-suggest,
.office-panel {
    animation: officeFadeUp 0.45s ease both;
}
.office-suggest { animation-delay: 0.06s; }
.office-panel:nth-of-type(1) { animation-delay: 0.1s; }
.office-panel:nth-of-type(2) { animation-delay: 0.16s; }
.office-progress > span {
    transition: width 0.8s ease;
}
.office-btn-gold:hover { filter: brightness(1.05); }
.office-btn-ink:hover { filter: brightness(1.08); }

.office-chips-more { display: none; }
@media (max-width: 640px) {
    .office-card { grid-template-columns: auto 1fr; }
    .office-badge { grid-column: 2; justify-self: start; }
    .office-chips .office-chip:nth-child(n+7) { display: none; }
    .office-chips.is-expanded .office-chip:nth-child(n+7) { display: inline-flex; }
    .office-chips-more { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
    .office-cover,
    .office-suggest,
    .office-panel,
    .office-card {
        animation: none !important;
        transition: none !important;
    }
    .office-progress > span { transition: none; }
}

/* رزنامة = نقطة انطلاق */
.cal-layout {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 340px);
    gap: 1.1rem;
    align-items: start;
}
.cal-main { min-width: 0; }
.cal-pick-list { display: grid; gap: 0.5rem; }
.cal-pick {
    display: grid;
    gap: 0.2rem;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    background: #fff;
    transition: border-color 0.2s, transform 0.15s, background 0.2s;
    position: relative;
}
.cal-pick:hover { border-color: var(--gold); transform: translateY(-1px); }
.cal-pick.is-active {
    border-color: var(--gold);
    background: #fff8e8;
    box-shadow: inset 3px 0 0 var(--gold);
}
.cal-pick.is-today:not(.is-active) { border-right: 3px solid var(--ink); }
.cal-pick-date { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.cal-pick strong { font-family: 'Cairo', sans-serif; font-size: 0.98rem; }
.cal-pick-type { font-size: 0.8rem; color: var(--muted); }
.cal-pick-go {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
    margin-top: 0.25rem;
}

.cal-action {
    position: sticky;
    top: 0.75rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink);
    padding: 1.1rem 1.15rem 1.25rem;
    box-shadow: 0 12px 36px rgba(26, 39, 68, 0.06);
    animation: officeFadeUp 0.4s ease both;
}
.cal-action-kind {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ink);
    background: rgba(196, 163, 90, 0.2);
    border: 1px solid var(--gold-soft);
    padding: 0.15rem 0.45rem;
    margin-bottom: 0.45rem;
}
.cal-action-head h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}
.cal-action-dates { font-size: 0.88rem; color: var(--muted); }
.cal-action-meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }
.cal-action-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.9rem 0 0.35rem;
}
.cal-action-block { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px dashed var(--line); }
.cal-action-block h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}
.cal-action-block p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }
.cal-action-reports,
.cal-action-similar { list-style: none; display: grid; gap: 0.45rem; }
.cal-action-reports a,
.cal-action-similar a {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--line);
    background: #fff;
}
.cal-action-reports a:hover,
.cal-action-similar a:hover { border-color: var(--gold); }
.cal-action-reports i { color: var(--gold); margin-top: 0.2rem; }
.cal-action-reports strong { display: block; font-size: 0.9rem; }
.cal-action-reports em {
    display: block;
    font-style: normal;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.15rem;
}
.cal-action-similar span {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
}
.cal-muted { font-size: 0.88rem; color: var(--muted); }
.cal-muted a { color: var(--ink); font-weight: 700; }

/* صفحة عمل المناسبة */
.work-flash {
    background: #eef8f2;
    border: 1px solid #a8d5bc;
    color: #1a5c3a;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.work-page { display: grid; gap: 1rem; }
.work-hero {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink);
    padding: 1.35rem 1.25rem 1.4rem;
    position: relative;
}
.work-hero::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid var(--gold-soft);
    pointer-events: none;
}
.work-hero-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.55rem;
    position: relative;
}
.work-hero h1 {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    position: relative;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}
.work-dates, .work-phase {
    position: relative;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}
.work-phase { font-weight: 700; color: var(--ink); margin-top: 0.35rem; }
.work-primary-cta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.work-inline-form { display: inline; }
.work-inline-form button:disabled { opacity: 0.55; cursor: default; }
.work-status {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--line);
}
.work-status-not_started { background: #f4f4f4; color: #5c6578; }
.work-status-in_progress { background: #fff8e8; color: #7a5c12; border-color: var(--gold-soft); }
.work-status-done { background: #eef8f2; color: #1a5c3a; border-color: #a8d5bc; }
.work-pin-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--ink);
    background: rgba(196, 163, 90, 0.25);
    padding: 0.15rem 0.45rem;
}
.work-status-form { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.work-status-opt {
    border: 1px solid var(--line);
    padding: 0.45rem 0.75rem;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    background: #fff;
}
.work-status-opt.is-on { border-color: var(--gold); background: #fff8e8; }
.work-status-opt input { margin-left: 0.35rem; }
.work-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.work-two p { color: var(--muted); font-size: 0.92rem; }
.work-timing-list { display: grid; gap: 0.5rem; }
.work-timing-card {
    display: grid;
    gap: 0.2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    padding: 0.75rem 0.85rem;
    background: #fff;
}
.work-timing-card:hover { border-color: var(--gold); }
.work-timing-card .when {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: none;
}
.work-timing-card strong { font-family: 'Cairo', sans-serif; font-size: 0.95rem; }
.work-timing-card em { font-style: normal; font-size: 0.82rem; color: var(--muted); }
.work-years { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.work-years a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line);
    background: #fff;
}
.work-years a.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cal-year-switch { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.cal-year-switch a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line);
    background: var(--sheet);
}
.cal-year-switch a.is-on { border-color: var(--gold); background: #fff8e8; }
.cal-pick-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.25rem; }
.cal-mini-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border: 1px solid var(--line);
}
@media (max-width: 700px) {
    .work-two { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .cal-layout { grid-template-columns: 1fr; }
    .cal-action { position: relative; top: 0; order: -1; }
}
