.weekly-reports-screen{padding:24px;min-height:100%}.weekly-shell{max-width:1320px;margin:auto}.weekly-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:26px;border:1px solid var(--border-color);border-radius:20px;background:linear-gradient(135deg,rgba(79,73,73,.96),rgba(45,41,41,.92));color:#fff;box-shadow:0 18px 50px rgba(0,0,0,.12)}.weekly-hero h2{margin:8px 0 6px;font-size:clamp(24px,3vw,34px)}.weekly-hero p{margin:0;color:#ddd5ca}.weekly-eyebrow{font-size:13px;color:#dcc59b}.weekly-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.weekly-hero-actions label{display:flex;align-items:center;gap:8px;color:#eee}.weekly-hero-actions input{padding:9px;border:1px solid rgba(255,255,255,.25);border-radius:9px;background:#fff;color:#333}.weekly-content{margin-top:20px}.weekly-loading,.weekly-empty{display:grid;place-items:center;min-height:240px;border:1px dashed var(--border-color);border-radius:18px;color:var(--text-muted);gap:10px}.weekly-notice{margin-bottom:14px;padding:14px 18px;border-radius:12px;background:#fff4d8;border:1px solid #e7c778;color:#704e00}.weekly-notice.is-danger{background:#fff0ef;border-color:#e99a93;color:#8f2f28}.weekly-progress-card,.weekly-admin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.weekly-metric{padding:18px;background:var(--card-bg);border:1px solid var(--border-color);border-radius:15px}.weekly-metric span{display:block;color:var(--text-muted);font-size:13px;margin-bottom:5px}.weekly-metric strong{font-size:24px;color:var(--text-main)}.weekly-progress-wrap{grid-column:span 2;padding:18px;background:var(--card-bg);border:1px solid var(--border-color);border-radius:15px}.weekly-progress-head{display:flex;justify-content:space-between;margin-bottom:10px}.weekly-progress{height:10px;background:rgba(120,120,120,.18);border-radius:10px;overflow:hidden}.weekly-progress>i{display:block;height:100%;width:0;background:linear-gradient(90deg,#b9945a,#e0c491);transition:width .25s}.weekly-customer-list{display:grid;gap:14px}.weekly-customer{display:grid;grid-template-columns:280px 1fr;gap:24px;background:var(--card-bg);border:1px solid var(--border-color);border-radius:16px;padding:24px;box-shadow:0 4px 15px rgba(0,0,0,0.1);align-items:start}.weekly-customer.is-complete{border-color:#68a67d}.weekly-customer-head{display:flex;flex-direction:column;gap:16px;margin-bottom:0;padding-left:24px;border-left:1px solid var(--border-color);height:100%}.weekly-customer-head h3{margin:0;font-size:20px;color:var(--primary-light)}.weekly-customer-meta{display:flex;flex-direction:column;gap:12px;color:var(--text-muted);font-size:13px}.weekly-customer-meta span{display:flex;align-items:center;gap:8px}.weekly-customer-meta i{width:16px;text-align:center;color:#888}.weekly-pill,.weekly-status{align-self:flex-start;display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;background:rgba(185,148,90,.14);color:#9b7438;font-size:12px}.weekly-status.submitted{background:#e7f5eb;color:#2f7645}.weekly-status.draft{background:#fff4d8;color:#7d5d0f}.weekly-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.weekly-field{display:flex;flex-direction:column;gap:7px}.weekly-field label{color:var(--text-muted);font-size:13px}.weekly-field textarea,.weekly-field input,.weekly-field select{width:100%;box-sizing:border-box;padding:11px 12px;border-radius:10px;border:1px solid var(--border-color);background:var(--bg-color-2,var(--card-bg));color:var(--text-main);font:inherit}.weekly-field textarea{min-height:75px;resize:vertical}.weekly-field.full-width{grid-column:span 2}.weekly-actions{position:sticky;bottom:12px;z-index:5;display:flex;justify-content:flex-end;gap:10px;margin-top:18px;padding:14px;border:1px solid var(--border-color);border-radius:15px;background:color-mix(in srgb,var(--card-bg) 92%,transparent);backdrop-filter:blur(12px)}.weekly-zero{padding:28px;border:1px solid var(--border-color);border-radius:18px;background:var(--card-bg);text-align:center}.weekly-zero label{display:flex;justify-content:center;align-items:center;gap:9px;margin:18px 0}.weekly-admin-table{width:100%;border-collapse:collapse;background:var(--card-bg);border-radius:16px;overflow:hidden}.weekly-admin-table th,.weekly-admin-table td{padding:14px;text-align:right;border-bottom:1px solid var(--border-color)}.weekly-admin-table th{color:var(--text-muted);font-size:13px}.weekly-admin-table button{padding:7px 11px}#weekly-reports-btn{position:relative}.weekly-report-badge{position:absolute;left:15px;top:50%;transform:translateY(-50%);width:8px;height:8px;border-radius:50%;background:#e74c3c;color:transparent;font-size:0;margin:0;padding:0;box-shadow:0 0 0 2px rgba(255,255,255,0.8)}.weekly-lock{padding:13px 16px;border-radius:12px;background:#e7f5eb;color:#2f7645;margin-bottom:15px}.weekly-error{padding:18px;border-radius:14px;background:#fff0ef;color:#8f2f28;border:1px solid #e99a93}.weekly-print-only{display:none}
@media(max-width:900px){.weekly-reports-screen{padding:14px}.weekly-hero{align-items:flex-start;flex-direction:column}.weekly-progress-card,.weekly-admin-metrics{grid-template-columns:1fr 1fr}.weekly-progress-wrap{grid-column:span 2}.weekly-fields{grid-template-columns:1fr 1fr}.weekly-field.summary,.weekly-field.next-action{grid-column:span 2}.weekly-admin-table{display:block;overflow:auto}}
@media(max-width:900px){.weekly-customer{grid-template-columns:1fr}.weekly-customer-head{border-left:none;border-bottom:1px solid var(--border-color);padding-left:0;padding-bottom:16px}}@media(max-width:600px){.weekly-progress-card,.weekly-admin-metrics,.weekly-fields{grid-template-columns:1fr}.weekly-progress-wrap,.weekly-field.full-width{grid-column:auto}.weekly-customer-head{flex-direction:column}.weekly-actions{flex-direction:column}.weekly-actions button{width:100%}}
@media print {
  body > *:not(#weekly-print-root) { display: none !important; }
  #weekly-print-root {
    display: block !important;
    color: #333;
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
    background: #f8f9fc;
    margin: 0;
    padding: 0;
  }
  .weekly-print-page {
    page-break-after: always;
    padding: 40px;
    background: #fff;
    position: relative;
    min-height: 100vh;
    box-sizing: border-box;
  }
  .weekly-print-page:last-child { page-break-after: auto; }
  .print-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .print-header { margin-bottom: 50px; }
  .print-logo {
    font-size: 32px;
    font-weight: 800;
    color: #b9945a;
    margin-bottom: 20px;
    letter-spacing: 1px;
  }
  .print-header h1 {
    font-size: 36px;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    font-weight: 700;
  }
  .print-period {
    font-size: 18px;
    color: #666;
    background: #f3f4f6;
    padding: 8px 24px;
    border-radius: 50px;
    display: inline-block;
    border: 1px solid #e5e7eb;
  }
  .print-summary-cards {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
    margin-bottom: 50px;
  }
  .print-card {
    flex: 1;
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    text-align: center;
  }
  .print-card span {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 600;
  }
  .print-card strong {
    display: block;
    font-size: 32px;
    color: #b9945a;
    font-weight: 800;
    line-height: 1;
  }
  .print-section-title {
    width: 100%;
    text-align: right;
    font-size: 22px;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #b9945a;
  }
  .weekly-print-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eaeaea;
  }
  .weekly-print-table th {
    background: #fafafa;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    padding: 16px;
    text-align: right;
    border-bottom: 1px solid #eaeaea;
  }
  .weekly-print-table td {
    padding: 16px;
    border-bottom: 1px solid #eaeaea;
    color: #1f2937;
    font-size: 15px;
  }
  .weekly-print-table tr:last-child td { border-bottom: none; }
  .print-status {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
  }
  .print-status.success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
  }
  .print-status.pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
  }
  .print-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #b9945a;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }
  .print-page-header h2 { margin: 0; font-size: 24px; color: #111827; }
  .print-page-header h2 span { color: #b9945a; }
  .print-logo-small {
    font-size: 20px;
    font-weight: 800;
    color: #d1d5db;
  }
  .print-entries {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .print-entry-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    page-break-inside: avoid;
  }
  .entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e5e7eb;
  }
  .entry-header h3 {
    margin: 0;
    font-size: 18px;
    color: #111827;
    font-weight: 700;
  }
  .entry-phone {
    font-size: 15px;
    color: #6b7280;
    font-family: monospace;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
  }
  .entry-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .detail-item.full-width { grid-column: span 2; }
  .detail-label {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .detail-value {
    font-size: 15px;
    color: #374151;
    line-height: 1.5;
    font-weight: 500;
  }
  .highlight-outcome {
    color: #b9945a;
    font-weight: 700;
  }
  .print-no-data {
    padding: 40px;
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
  }
}
.dashboard-data-notice{display:flex;align-items:center;gap:10px;margin:0 20px 16px;padding:12px 15px;border-radius:12px;border:1px solid var(--border-color);background:var(--card-bg);color:var(--text-muted)}.dashboard-data-notice.is-loading i{color:var(--primary-light)}.dashboard-data-notice.is-error{border-color:#b96059;background:rgba(185,72,64,.12);color:#e2aaa5}.dashboard-data-notice button{margin-inline-start:auto;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;padding:7px 12px;cursor:pointer}
.weekly-hero-actions label{flex-wrap:wrap}.weekly-date-range-hint{flex-basis:100%;font-size:11px;color:#d8cdbd;text-align:center}.weekly-week-navigator{display:grid;grid-template-columns:auto minmax(240px,1fr) auto;align-items:end;gap:9px;min-width:min(100%,620px)}.weekly-week-navigator[hidden]{display:none!important}.weekly-week-select-wrap{display:flex!important;flex-direction:column;align-items:stretch!important;gap:5px!important}.weekly-week-select-wrap>span{font-size:11px;color:#d8cdbd}.weekly-week-select-wrap select{width:100%;padding:10px 12px;border-radius:9px;border:1px solid rgba(255,255,255,.25);background:#fff;color:#333;font:inherit}.weekly-week-navigator .weekly-status{grid-column:2;justify-self:center}.weekly-week-navigator .weekly-date-range-hint{grid-column:1/-1}.weekly-week-navigator button:disabled{opacity:.42;cursor:not-allowed}
@media(max-width:700px){.weekly-week-navigator{grid-template-columns:1fr 1fr;min-width:100%}.weekly-week-select-wrap{grid-column:1/-1;grid-row:1}.weekly-week-navigator .weekly-status{grid-column:1/-1}.weekly-week-navigator .weekly-date-range-hint{grid-column:1/-1}.weekly-week-navigator button{width:100%}}
.weekly-hero-actions{width:min(100%,620px);justify-content:flex-start;gap:7px}.weekly-week-navigator{flex:1 0 100%;grid-template-columns:auto minmax(220px,250px) auto;justify-content:center;gap:7px}.weekly-week-navigator .secondary-btn{width:auto!important;min-height:34px;margin:0;padding:7px 11px;font-size:.76rem;line-height:1.2;border-radius:9px;gap:6px}.weekly-week-navigator .secondary-btn i{font-size:.65rem}.weekly-week-select-wrap select{height:36px;padding:7px 10px;font-size:.8rem}.weekly-week-select-wrap>span{font-size:.66rem}.weekly-date-range-hint{font-size:.65rem;line-height:1.25}.weekly-hero-actions>#weekly-refresh-btn,.weekly-hero-actions>#weekly-print-btn{width:auto!important;min-width:0;min-height:34px;margin:0;padding:7px 12px;font-size:.75rem;line-height:1.2;border-radius:9px;gap:6px}.weekly-hero-actions>#weekly-refresh-btn i,.weekly-hero-actions>#weekly-print-btn i{font-size:.72rem}.weekly-hero-actions>#weekly-print-btn{padding-inline:13px}
@media(max-width:700px){.weekly-hero-actions{width:100%;gap:6px}.weekly-week-navigator{grid-template-columns:1fr 1fr;justify-content:stretch;gap:6px}.weekly-week-navigator .secondary-btn{width:100%!important;padding:7px 9px;font-size:.72rem}.weekly-hero-actions>#weekly-refresh-btn,.weekly-hero-actions>#weekly-print-btn{flex:0 1 auto;font-size:.72rem;padding:7px 10px}}
