    :root {
      /* Brand Identity Colors: Halal Marketing & Leadership */
      --brand-forest: #2f573c;   /* الأخضر الداكن الأساسي للكلمة */
      --brand-sage: #5b764b;     /* الأخضر الزيتوني الفرعي */
      --brand-gold: #c79441;     /* الذهبي الأنيق الخاص بريادة وشوكة اللوجو */
      --brand-gold-hover: #b58334;
      --brand-gold-light: #e6b76c;

      /* Dark Theme (Default) - Sleek Hunter Slate */
      --bg-primary: #09120e;
      --bg-secondary: #102018;
      --bg-card: #15291f;
      --bg-card-hover: #1c3629;
      --border-color: #244634;
      --border-subtle: #193425;
      
      --text-main: #f3f8f5;
      --text-muted: #9ebdb0;
      --text-subtle: #6d8e7e;
      
      --accent: var(--brand-gold);
      --accent-hover: var(--brand-gold-hover);
      --accent-glow: rgba(199, 148, 65, 0.28);
      --brand-glow: rgba(47, 87, 60, 0.35);
      
      --success: #10b981;
      --success-glow: rgba(16, 185, 129, 0.2);
      --warning: #f59e0b;
      --danger: #ef4444;
      --info: #0ea5e9;

      /* Task Types Colors */
      --badge-reel: #8b5cf6;
      --badge-poster: var(--brand-sage);
      --badge-copy: #c79441;
      --badge-ads: #d97706;
      --badge-shoot: var(--brand-forest);
      --badge-story: #0d9488;
      --badge-report: #4f46e5;
      --badge-custom: #64748b;

      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-xl: 22px;
      
      --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
      --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.35);
      --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.45);
    }

    [data-theme="light"] {
      --bg-primary: #f6f9f7;
      --bg-secondary: #ffffff;
      --bg-card: #ffffff;
      --bg-card-hover: #eef5f0;
      --border-color: #d6e3da;
      --border-subtle: #e9f1eb;
      
      --text-main: #112318;
      --text-muted: #3a5c48;
      --text-subtle: #6b8d79;
      
      --accent: #b38131;
      --accent-hover: #986c25;
      --accent-glow: rgba(179, 129, 49, 0.18);
      --brand-glow: rgba(47, 87, 60, 0.12);
      
      --shadow-sm: 0 2px 8px rgba(47, 87, 60, 0.05);
      --shadow-md: 0 4px 16px rgba(47, 87, 60, 0.08);
      --shadow-lg: 0 10px 30px rgba(47, 87, 60, 0.12);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: 'Cairo', 'Tajawal', sans-serif;
    }

    body {
      background-color: var(--bg-primary);
      color: var(--text-main);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      line-height: 1.6;
      transition: background-color 0.3s ease, color 0.3s ease;
    }

    /* Container */
    .app-container {
      max-width: 1300px;
      margin: 0 auto;
      padding: 20px 24px 60px;
      width: 100%;
    }

    /* Header */
    header {
      background: var(--bg-secondary);
      border-bottom: 1.5px solid var(--border-color);
      position: sticky;
      top: 0;
      z-index: 40;
      
    }

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

    .brand-section {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .brand-logo-container {
      width: 52px;
      height: 52px;
      background: #ffffff;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 3px;
      border: 1.5px solid var(--accent);
      box-shadow: 0 4px 14px var(--accent-glow);
      overflow: hidden;
      flex-shrink: 0;
    }

    .brand-logo-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .brand-title {
      font-size: 22px;
      font-weight: 900;
      letter-spacing: -0.5px;
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-main);
    }

    .brand-badge {
      font-size: 12px;
      font-weight: 700;
      color: var(--brand-gold);
      background: rgba(199, 148, 65, 0.15);
      border: 1px solid rgba(199, 148, 65, 0.3);
      padding: 2px 10px;
      border-radius: 20px;
      letter-spacing: 0.3px;
    }

    .brand-tagline {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 500;
    }

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

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 9px 18px;
      font-size: 14px;
      font-weight: 700;
      border-radius: var(--radius-md);
      border: 1px solid transparent;
      cursor: pointer;
      transition: var(--transition);
      text-decoration: none;
      white-space: nowrap;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--brand-forest), #1d3b28);
      color: #ffffff;
      border: 1px solid var(--accent);
      box-shadow: 0 4px 14px var(--accent-glow);
    }

    .btn-primary:hover {
      background: linear-gradient(135deg, #376646, #244832);
      border-color: var(--brand-gold-light);
      transform: translateY(-1px);
    }

    .btn-gold {
      background: linear-gradient(135deg, var(--brand-gold), #b38234);
      color: #0b1610;
      font-weight: 800;
      box-shadow: 0 4px 14px var(--accent-glow);
      border: none;
    }

    .btn-gold:hover {
      background: linear-gradient(135deg, #d4a24f, #c79441);
      transform: translateY(-1px);
    }

    .btn-secondary {
      background: var(--bg-card);
      color: var(--text-main);
      border-color: var(--border-color);
    }

    .btn-secondary:hover {
      background: var(--bg-card-hover);
      border-color: var(--accent);
    }

    .btn-icon {
      padding: 9px;
      width: 40px;
      height: 40px;
      border-radius: var(--radius-md);
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: var(--transition);
    }

    .btn-icon:hover {
      color: var(--brand-gold);
      border-color: var(--brand-gold);
    }

    .btn-sm {
      padding: 6px 12px;
      font-size: 12px;
      border-radius: var(--radius-sm);
    }

    .btn-danger-outline {
      background: transparent;
      color: var(--danger);
      border-color: rgba(239, 68, 68, 0.3);
    }

    .btn-danger-outline:hover {
      background: rgba(239, 68, 68, 0.1);
      border-color: var(--danger);
    }

    .btn-postpone {
      background: rgba(199, 148, 65, 0.12);
      color: var(--brand-gold-light);
      border: 1px solid rgba(199, 148, 65, 0.35);
    }

    .btn-postpone:hover {
      background: rgba(199, 148, 65, 0.25);
      border-color: var(--brand-gold);
      color: #ffffff;
    }

    /* Sub-nav / Main Navigation Tabs */
    .nav-tabs-wrapper {
      margin: 24px 0 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .nav-tabs {
      display: flex;
      background: var(--bg-secondary);
      padding: 5px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--border-color);
      gap: 4px;
    }

    .tab-btn {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text-muted);
      background: transparent;
      border: none;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .tab-btn.active {
      background: linear-gradient(135deg, var(--brand-forest), #1d3b28);
      color: #ffffff;
      border: 1px solid var(--accent);
      box-shadow: 0 4px 14px var(--accent-glow);
    }

    .tab-badge {
      background: rgba(199, 148, 65, 0.25);
      color: var(--brand-gold-light);
      font-size: 11px;
      padding: 2px 7px;
      border-radius: 20px;
      font-weight: 800;
      border: 1px solid rgba(199, 148, 65, 0.3);
    }

    .today-clock-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      padding: 8px 16px;
      border-radius: var(--radius-lg);
      font-size: 13px;
      color: var(--text-muted);
    }

    .live-dot {
      width: 8px;
      height: 8px;
      background: var(--brand-gold);
      border-radius: 50%;
      box-shadow: 0 0 8px var(--brand-gold);
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(0.9); }
      100% { opacity: 1; transform: scale(1); }
    }

    /* Views Layout */
    .view-content {
      display: none;
    }

    .view-content.active {
      display: block;
      animation: fadeIn 0.25s ease-out;
    }

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

    /* TODAY'S FOCUS VIEW (The Anti-Distraction Hero) */
    .focus-hero-card {
      background: linear-gradient(135deg, rgba(47, 87, 60, 0.45) 0%, rgba(199, 148, 65, 0.18) 100%);
      border: 1px solid rgba(199, 148, 65, 0.35);
      border-radius: var(--radius-xl);
      padding: 24px 28px;
      margin-bottom: 24px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .focus-hero-card::before {
      content: '';
      position: absolute;
      top: -40px;
      left: -40px;
      width: 140px;
      height: 140px;
      background: radial-gradient(circle, rgba(199, 148, 65, 0.2) 0%, transparent 70%);
      pointer-events: none;
    }

    .focus-hero-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 20px;
      flex-wrap: wrap;
    }

    /* Daily Hadith Component */
    .hadith-container {
      flex: 1;
      min-width: 320px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .hadith-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .hadith-badge {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      background: rgba(199, 148, 65, 0.16);
      border: 1px solid rgba(199, 148, 65, 0.38);
      color: var(--brand-gold-light);
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12.5px;
      font-weight: 800;
      letter-spacing: 0.2px;
    }

    .hadith-badge-icon {
      font-size: 14px;
    }

    .hadith-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .btn-hadith-action {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(16, 32, 24, 0.65);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      padding: 4px 10px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
    }

    .btn-hadith-action:hover {
      background: var(--bg-card);
      border-color: var(--brand-gold);
      color: var(--brand-gold-light);
      transform: translateY(-1px);
    }

    .hadith-body {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      margin: 4px 0;
    }

    .hadith-quote-mark {
      color: var(--brand-gold);
      font-size: 24px;
      font-weight: 900;
      line-height: 1;
      opacity: 0.85;
      user-select: none;
      flex-shrink: 0;
    }

    .hadith-content {
      font-size: 16px;
      font-weight: 600;
      line-height: 1.85;
      color: var(--text-main);
      letter-spacing: 0.2px;
      transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hadith-footer {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .hadith-source-badge {
      font-size: 12px;
      font-weight: 700;
      color: var(--brand-gold);
      background: rgba(47, 87, 60, 0.35);
      border: 1px solid rgba(199, 148, 65, 0.28);
      padding: 2px 10px;
      border-radius: 6px;
    }

    .hadith-day-notice {
      font-size: 12px;
      color: var(--text-muted);
    }

    .progress-box {
      min-width: 250px;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 14px 18px;
      box-shadow: var(--shadow-sm);
    }

    .progress-label-row {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .progress-track {
      height: 9px;
      background: var(--border-subtle);
      border-radius: 10px;
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      background: linear-gradient(90deg, var(--brand-gold), var(--brand-sage), var(--brand-forest));
      width: 0%;
      transition: width 0.4s ease;
      border-radius: 10px;
    }

    /* Day Picker Pills */
    .day-selector-pills {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 12px;
      margin-bottom: 20px;
      scrollbar-width: thin;
    }

    .day-pill {
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      padding: 8px 16px;
      border-radius: var(--radius-lg);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .day-pill:hover {
      border-color: var(--accent);
      color: var(--text-main);
    }

    .day-pill.active {
      background: var(--bg-card);
      border-color: var(--accent);
      color: var(--accent);
      box-shadow: 0 2px 10px var(--accent-glow);
    }

    .day-pill.is-today-marker {
      position: relative;
    }

    .day-pill.is-today-marker::after {
      content: "اليوم";
      font-size: 9px;
      background: var(--brand-forest);
      border: 1px solid var(--brand-gold);
      color: #ffffff;
      padding: 1px 6px;
      border-radius: 6px;
      margin-right: 5px;
      font-weight: 800;
    }

    /* Today's Quick Task Bar */
    .today-quick-task-bar {
      background: linear-gradient(135deg, rgba(47, 87, 60, 0.22) 0%, rgba(21, 41, 31, 0.9) 100%);
      border: 1.5px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 12px 18px;
      margin-bottom: 22px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
      transition: var(--transition);
    }

    .today-quick-task-bar:focus-within {
      border-color: var(--brand-gold);
      box-shadow: 0 6px 24px var(--accent-glow);
    }

    .quick-task-input-wrapper {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--bg-primary);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 5px 14px;
      transition: var(--transition);
    }

    .quick-task-input-wrapper:focus-within {
      border-color: var(--brand-gold);
      background: var(--bg-secondary);
    }

    .quick-task-icon {
      font-size: 17px;
      color: var(--brand-gold);
      flex-shrink: 0;
    }

    .quick-task-input {
      width: 100%;
      background: transparent;
      border: none;
      outline: none;
      color: var(--text-main);
      font-size: 14.5px;
      font-weight: 600;
      padding: 8px 0;
    }

    .quick-task-input::placeholder {
      color: var(--text-muted);
      font-size: 13.5px;
      font-weight: 400;
    }

    .quick-task-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .quick-task-select {
      background: var(--bg-primary);
      color: var(--text-main);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 9px 12px;
      font-size: 13px;
      font-weight: 700;
      outline: none;
      cursor: pointer;
      transition: var(--transition);
    }

    .quick-task-select:hover, .quick-task-select:focus {
      border-color: var(--brand-gold);
    }

    .quick-task-btn {
      white-space: nowrap;
      padding: 9px 18px;
    }

    /* Tasks Section */
    .tasks-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 16px;
    }

    .task-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 18px 20px;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      gap: 12px;
      position: relative;
    }

    .task-card:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }

    .task-card.completed {
      opacity: 0.65;
      border-color: rgba(199, 148, 65, 0.3);
      background: rgba(47, 87, 60, 0.12);
    }

    .task-card.completed .task-desc {
      text-decoration: line-through;
      color: var(--text-muted);
    }

    .task-card.is-postponed-item {
      border-color: rgba(199, 148, 65, 0.5);
      background: linear-gradient(180deg, rgba(199, 148, 65, 0.05) 0%, var(--bg-card) 100%);
    }

    .task-card.is-quick-task {
      border-right: 4px solid var(--brand-gold);
      background: linear-gradient(135deg, rgba(199, 148, 65, 0.06) 0%, var(--bg-card) 100%);
    }

    .task-card.is-quick-task.priority-high {
      border-right: 4px solid #ef4444;
      background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 100%);
    }

    .badge-quick-task {
      background: rgba(199, 148, 65, 0.18);
      color: var(--brand-gold-light);
      border: 1px solid rgba(199, 148, 65, 0.4);
    }

    .badge-quick-task-high {
      background: rgba(239, 68, 68, 0.18);
      color: #fca5a5;
      border: 1px solid rgba(239, 68, 68, 0.4);
    }

    .task-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .client-info-link {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      color: var(--text-main);
      cursor: pointer;
    }

    .client-avatar-mini {
      width: 34px;
      height: 34px;
      border-radius: var(--radius-sm);
      background: linear-gradient(135deg, var(--brand-forest), var(--brand-sage));
      border: 1px solid rgba(199, 148, 65, 0.4);
      color: #ffffff;
      font-weight: 800;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .client-name {
      font-weight: 800;
      font-size: 15px;
    }

    .client-category {
      font-size: 12px;
      color: var(--text-muted);
    }

    /* Badge Types */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.2px;
      color: white;
    }

    .badge-reel { background-color: var(--badge-reel); }
    .badge-poster { background-color: var(--badge-poster); }
    .badge-copy { background-color: var(--badge-copy); color: #0b1610; }
    .badge-ads { background-color: var(--badge-ads); }
    .badge-shoot { background-color: var(--badge-shoot); border: 1px solid var(--accent); }
    .badge-story { background-color: var(--badge-story); }
    .badge-report { background-color: var(--badge-report); }
    .badge-custom { background-color: var(--badge-custom); }

    .badge-postponed-notice {
      background: rgba(199, 148, 65, 0.2);
      border: 1px solid var(--brand-gold);
      color: var(--brand-gold-light);
      font-size: 11px;
      font-weight: 800;
      padding: 3px 8px;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .task-body {
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .custom-checkbox {
      width: 23px;
      height: 23px;
      border-radius: 6px;
      border: 2px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: var(--transition);
      margin-top: 3px;
      background: var(--bg-secondary);
      font-weight: 800;
    }

    .custom-checkbox:hover {
      border-color: var(--accent);
    }

    .task-card.completed .custom-checkbox {
      background: var(--brand-gold);
      border-color: var(--brand-gold);
      color: #0b1610;
    }

    .task-desc {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-main);
      line-height: 1.5;
    }

    .postpone-reason-tag {
      font-size: 12px;
      color: var(--brand-gold);
      background: rgba(199, 148, 65, 0.08);
      padding: 4px 10px;
      border-radius: 6px;
      border-right: 2px solid var(--brand-gold);
      margin-top: 4px;
    }

    .task-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12px;
      color: var(--text-subtle);
      border-top: 1px solid var(--border-subtle);
      padding-top: 10px;
      margin-top: auto;
      gap: 8px;
      flex-wrap: wrap;
    }

    .task-assignee {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .task-action-btns {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Outgoing Postponed Section Box */
    .postponed-summary-banner {
      margin-top: 28px;
      background: var(--bg-secondary);
      border: 1px dashed rgba(199, 148, 65, 0.4);
      border-radius: var(--radius-lg);
      padding: 16px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .postponed-summary-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--brand-gold);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .postponed-item-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 12px;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      font-size: 13px;
    }

    /* EMPTY STATE */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
      background: var(--bg-secondary);
      border: 1px dashed var(--border-color);
      border-radius: var(--radius-xl);
      max-width: 500px;
      margin: 40px auto;
    }

    .empty-icon {
      font-size: 48px;
      margin-bottom: 12px;
    }

    .empty-title {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 6px;
    }

    .empty-desc {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 20px;
    }

    /* WEEKLY BOARD VIEW */
    .week-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(170px, 1fr));
      gap: 14px;
      overflow-x: auto;
      padding-bottom: 20px;
      align-items: start;
    }

    .week-col {
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-height: 480px;
    }

    .week-col.is-today-col {
      border-color: var(--accent);
      background: linear-gradient(180deg, rgba(199, 148, 65, 0.08) 0%, var(--bg-secondary) 100%);
      box-shadow: 0 0 16px var(--accent-glow);
    }

    .week-col-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border-color);
    }

    .week-col-name {
      font-weight: 800;
      font-size: 15px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .week-col-count {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--accent);
      font-size: 11px;
      padding: 2px 7px;
      border-radius: 12px;
      font-weight: 800;
    }

    .week-col-tasks {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .week-mini-task {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 10px;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .week-mini-task:hover {
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .week-mini-task.is-postponed-mini {
      border-color: rgba(199, 148, 65, 0.5);
      background: rgba(199, 148, 65, 0.05);
    }

    .week-mini-client {
      font-size: 13px;
      font-weight: 800;
      color: var(--text-main);
    }

    .week-mini-desc {
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.4;
    }

    /* CLIENTS HUB VIEW */
    .clients-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .search-box {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      padding: 8px 16px;
      border-radius: var(--radius-lg);
      flex: 1;
      max-width: 400px;
    }

    .search-box input {
      background: transparent;
      border: none;
      color: var(--text-main);
      font-size: 14px;
      width: 100%;
      outline: none;
    }

    .clients-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 20px;
    }

    .client-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-xl);
      padding: 22px;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      gap: 16px;
      position: relative;
    }

    .client-card:hover {
      border-color: var(--accent);
      box-shadow: var(--shadow-md);
      transform: translateY(-2px);
    }

    .client-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }

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

    .client-big-avatar {
      width: 48px;
      height: 48px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, var(--brand-forest), var(--brand-sage));
      border: 1.5px solid var(--accent);
      color: white;
      font-size: 18px;
      font-weight: 900;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px var(--brand-glow);
    }

    .client-title-block h3 {
      font-size: 17px;
      font-weight: 800;
    }

    .client-title-block p {
      font-size: 13px;
      color: var(--text-muted);
    }

    .client-days-summary {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .client-days-summary-title {
      font-size: 12px;
      font-weight: 800;
      color: var(--accent);
      text-transform: uppercase;
    }

    .client-days-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .client-day-tag {
      font-size: 12px;
      padding: 3px 9px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 6px;
      color: var(--text-main);
      font-weight: 600;
    }

    .client-notes {
      font-size: 13px;
      color: var(--text-muted);
      background: var(--bg-primary);
      padding: 10px 14px;
      border-radius: var(--radius-md);
      border-right: 3px solid var(--accent);
      font-style: italic;
    }

    .client-card-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin-top: auto;
      padding-top: 12px;
      border-top: 1px solid var(--border-subtle);
    }

    /* MODAL STYLES */
    .modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(5, 12, 8, 0.82);
      
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 100;
      padding: 20px;
      opacity: 0;
      visibility: hidden;
      transition: var(--transition);
    }

    .modal-backdrop.open {
      opacity: 1;
      visibility: visible;
    }

    .modal-card {
      background: var(--bg-secondary);
      border: 1.5px solid var(--border-color);
      border-radius: var(--radius-xl);
      width: 100%;
      max-width: 760px;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: var(--shadow-lg);
      transform: translateY(20px);
      transition: var(--transition);
      display: flex;
      flex-direction: column;
    }

    .modal-backdrop.open .modal-card {
      transform: translateY(0);
    }

    .modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      background: var(--bg-secondary);
      z-index: 10;
    }

    .modal-header h2 {
      font-size: 19px;
      font-weight: 800;
    }

    .modal-body {
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-label {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-main);
    }

    .form-control {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--text-main);
      padding: 10px 14px;
      border-radius: var(--radius-md);
      font-size: 14px;
      outline: none;
      transition: var(--transition);
      width: 100%;
    }

    .form-control:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    /* Postpone Modal Day Select Buttons */
    .postpone-day-btn {
      background: var(--bg-card);
      border: 1.5px solid var(--border-color);
      color: var(--text-main);
      padding: 10px 12px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      text-align: center;
    }

    .postpone-day-btn:hover {
      border-color: var(--accent);
      background: var(--bg-card-hover);
    }

    .postpone-day-btn.selected {
      background: rgba(199, 148, 65, 0.15);
      border-color: var(--brand-gold);
      color: var(--brand-gold-light);
      box-shadow: 0 0 10px var(--accent-glow);
    }

    /* Day Schedule Builder in Modal */
    .schedule-builder-title {
      font-size: 15px;
      font-weight: 800;
      margin-top: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: var(--accent);
    }

    .schedule-day-box {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      transition: var(--transition);
    }

    .schedule-day-box.active-day {
      border-color: var(--accent);
      background: rgba(199, 148, 65, 0.06);
    }

    .schedule-day-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .day-toggle-label {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 800;
      font-size: 15px;
      cursor: pointer;
    }

    .day-details-fields {
      display: none;
      grid-template-columns: 140px 1fr 120px;
      gap: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--border-subtle);
    }

    .schedule-day-box.active-day .day-details-fields {
      display: grid;
    }

    .modal-footer {
      padding: 18px 24px;
      border-top: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      background: var(--bg-secondary);
      position: sticky;
      bottom: 0;
      z-index: 10;
    }

    /* CLIENT DETAILS MODAL */
    .client-details-grid {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .client-detail-day-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      gap: 12px;
    }

    /* Toast Notification */
    .toast-container {
      position: fixed;
      bottom: 24px;
      left: 24px;
      z-index: 200;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .toast {
      background: var(--bg-card);
      color: var(--text-main);
      border: 1px solid var(--border-color);
      padding: 12px 20px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 700;
      box-shadow: var(--shadow-lg);
      display: flex;
      align-items: center;
      gap: 10px;
      animation: slideUp 0.3s ease forwards;
    }

    .toast.success { border-right: 4px solid var(--brand-gold); }
    .toast.info { border-right: 4px solid var(--info); }
    .toast.danger { border-right: 4px solid var(--danger); }

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

    /* Responsive adjustments */
    @media (max-width: 900px) {
      .form-row { grid-template-columns: 1fr; }
      .day-details-fields { grid-template-columns: 1fr; }
    }

    /* Mobile & Smartphone Optimizations (iOS / Android) */
    @media (max-width: 768px) {
      body {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
      }

      /* Mobile Sticky Header */
      header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
      }

      .header-inner {
        padding: 8px 12px;
        gap: 6px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .brand-section {
        gap: 8px;
        flex-shrink: 0;
      }

      .brand-logo-container {
        width: 36px;
        height: 36px;
        padding: 2px;
      }

      .brand-title {
        font-size: 16px;
      }

      .brand-badge,
      .brand-tagline {
        display: none !important;
      }

      .header-actions {
        gap: 5px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
      }

      #btn-open-add-client {
        padding: 6px 9px;
        font-size: 12px;
        border-radius: var(--radius-sm);
        gap: 3px;
      }

      .btn-backup-export,
      .btn-backup-import {
        padding: 6px 7px;
        font-size: 13px;
        min-width: 32px;
      }

      .cloud-sync-badge {
        padding: 5px 8px;
        font-size: 11px;
        gap: 3px;
      }

      .btn-icon {
        width: 33px;
        height: 33px;
        font-size: 13px;
        border-radius: var(--radius-sm);
      }

      .btn-text-full {
        display: none !important;
      }
      .btn-text-short {
        display: inline !important;
      }

      /* Native-Style Mobile App Bottom Navigation Bar */
      .app-container {
        padding: 10px 12px calc(80px + env(safe-area-inset-bottom, 0px));
      }

      .nav-tabs-wrapper {
        margin: 0;
        display: block;
      }

      .today-clock-badge {
        margin: 4px 0 12px;
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 6px 12px;
        border-radius: var(--radius-md);
      }

      .nav-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        z-index: 9999;
        background: rgba(9, 18, 14, 0.95);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid var(--border-color);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        display: flex;
        justify-content: space-around;
        gap: 4px;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
      }

      [data-theme="light"] .nav-tabs {
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
      }

      .tab-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 2px;
        background: transparent;
        border: none;
        border-radius: var(--radius-md);
        color: var(--text-muted);
        position: relative;
        gap: 2px;
        transition: var(--transition);
      }

      .tab-icon {
        font-size: 20px;
        line-height: 1;
      }

      .tab-text-full {
        display: none !important;
      }

      .tab-text-short {
        display: block !important;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.2;
      }

      .tab-btn.active {
        color: var(--brand-gold-light);
        background: rgba(199, 148, 65, 0.14);
      }

      .tab-btn.active .tab-icon {
        transform: scale(1.1);
      }

      .tab-btn .tab-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 18px);
        font-size: 9px;
        padding: 1px 5px;
        line-height: 1.2;
        min-width: 16px;
        text-align: center;
      }

      /* Hero Focus Card on Mobile */
      .focus-hero-card {
        padding: 14px 16px;
        border-radius: var(--radius-lg);
        margin-bottom: 12px;
      }

      .hadith-container {
        min-width: 100%;
        width: 100%;
        gap: 8px;
      }

      .hadith-content {
        font-size: 14.5px;
        line-height: 1.75;
      }

      .hadith-header-row {
        gap: 8px;
      }

      .progress-box {
        width: 100%;
        min-width: unset;
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: var(--radius-md);
      }

      /* Day Selector Pills: Horizontal Touch Carousel */
      .day-selector-pills {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 2px 2px 8px;
        margin-bottom: 12px;
        scrollbar-width: none;
      }

      .day-selector-pills::-webkit-scrollbar {
        display: none;
      }

      .day-pill {
        flex-shrink: 0;
        padding: 7px 13px;
        font-size: 12.5px;
        border-radius: var(--radius-md);
      }

      /* Today's Quick Task Bar on Mobile */
      .today-quick-task-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px;
        gap: 8px;
        margin-bottom: 14px;
      }

      .quick-task-input-wrapper {
        padding: 3px 10px;
      }

      .quick-task-input {
        font-size: 13.5px;
      }

      .quick-task-actions {
        display: flex;
        gap: 8px;
        width: 100%;
      }

      .quick-task-select {
        flex: 1;
        padding: 8px 10px;
        font-size: 12px;
      }

      .quick-task-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 12.5px;
        justify-content: center;
      }

      /* Tasks Grid on Mobile */
      .tasks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .task-card {
        padding: 13px 14px;
        border-radius: var(--radius-lg);
        gap: 10px;
      }

      .client-avatar-mini {
        width: 32px;
        height: 32px;
        font-size: 13px;
      }

      .client-name {
        font-size: 14px;
      }

      .custom-checkbox {
        width: 28px;
        height: 28px;
        font-size: 15px;
        border-radius: 8px;
        flex-shrink: 0;
      }

      .task-desc {
        font-size: 14px;
        line-height: 1.5;
      }

      .task-meta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 8px;
      }

      .task-action-btns {
        display: flex;
        width: 100%;
        gap: 6px;
      }

      .task-action-btns .btn {
        flex: 1;
        padding: 7px 6px;
        font-size: 12px;
        justify-content: center;
      }

      /* Weekly Board: Smooth Carousel on Mobile */
      .week-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 16px;
        scrollbar-width: none;
      }

      .week-grid::-webkit-scrollbar {
        display: none;
      }

      .week-col {
        min-width: 82vw;
        max-width: 85vw;
        scroll-snap-align: center;
        flex-shrink: 0;
        min-height: 400px;
        padding: 14px;
        border-radius: var(--radius-lg);
      }

      /* Clients Hub on Mobile */
      .clients-toolbar {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
      }

      .search-box {
        max-width: 100%;
        padding: 9px 14px;
        font-size: 14px;
      }

      .clients-grid {
        grid-template-columns: 1fr;
        gap: 14px;
      }

      .client-card {
        padding: 14px;
        border-radius: var(--radius-lg);
      }

      .client-links-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 10px 0;
      }

      .client-link-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 8px;
      }

      .client-billing-card {
        padding: 10px 12px;
        margin: 8px 0;
      }

      .client-card-actions {
        display: flex;
        gap: 6px;
        margin-top: 12px;
      }

      .client-card-actions .btn {
        flex: 1;
        padding: 8px 6px;
        font-size: 12px;
        justify-content: center;
      }

      /* Ideas / Scratchpad on Mobile */
      .scratchpad-container {
        padding: 14px 12px;
        border-radius: var(--radius-lg);
      }

      .scratchpad-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 10px;
      }

      .scratchpad-title {
        font-size: 17px;
      }

      .scratchpad-actions {
        width: 100%;
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 2px 2px 8px;
        margin-bottom: 6px;
        scrollbar-width: none;
      }

      .scratchpad-actions::-webkit-scrollbar {
        display: none;
      }

      .scratchpad-actions .btn {
        flex-shrink: 0;
        padding: 7px 11px;
        font-size: 12px;
        white-space: nowrap;
        border-radius: var(--radius-md);
      }

      .white-paper-wrapper {
        padding: 12px 14px;
        border-radius: var(--radius-lg);
      }

      .white-paper-textarea {
        font-size: 16px !important;
        min-height: 380px;
        line-height: 1.65;
        padding: 6px 2px;
      }

      .scratchpad-footer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 11.5px;
      }

      /* Bottom Sheet Modals on Mobile */
      .modal-backdrop {
        padding: 0;
        align-items: flex-end;
      }

      .modal-card {
        max-width: 100%;
        max-height: 88vh;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
      }

      .modal-header {
        padding: 14px 16px;
      }

      .modal-header h2 {
        font-size: 16px;
      }

      .modal-body {
        padding: 14px 16px;
        gap: 12px;
      }

      /* Prevent iOS auto-zoom on input focus */
      .form-control, input, select, textarea {
        font-size: 16px !important;
        padding: 10px 12px;
      }

      .modal-footer {
        padding: 12px 16px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      }

      .modal-footer .btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 13.5px;
      }

      #postpone-day-options {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
      }

      .postpone-day-btn {
        padding: 9px 4px;
        font-size: 12.5px;
      }

      /* Toast on Mobile: Position above bottom nav */
      .toast-container {
        left: 14px;
        right: 14px;
        bottom: calc(75px + env(safe-area-inset-bottom, 0px));
      }

      .toast {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 10px 14px;
      }

      /* Mobile Lock Screen */
      .lock-card {
        width: 92%;
        max-width: 360px;
        padding: 26px 18px;
        border-radius: var(--radius-xl);
      }

      .lock-shield-badge {
        width: 58px;
        height: 58px;
        font-size: 26px;
        margin-bottom: 12px;
      }

      .lock-title {
        font-size: 1.22rem;
      }

      .lock-subtitle {
        font-size: 0.8rem;
        margin-bottom: 18px;
      }

      .lock-input {
        font-size: 16px !important;
        padding: 12px 14px;
        padding-left: 42px;
      }

      .lock-submit-btn {
        padding: 12px 16px;
        font-size: 0.98rem;
      }
    }

    @media (max-width: 480px) {
      .header-inner {
        padding: 6px 10px;
      }
      .brand-title {
        font-size: 15px;
      }
      .brand-logo-container {
        width: 32px;
        height: 32px;
      }
      .week-col {
        min-width: 88vw;
      }
    }
    
    /* --- IDEAS HUB STYLES --- */
    .ideas-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .ideas-filters-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .ideas-filter-select {
      max-width: 190px;
      padding: 8px 12px;
      font-size: 13px;
    }

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

    .idea-card {
      background: var(--bg-card);
      border: 1.5px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: var(--transition);
      position: relative;
    }

    .idea-card:hover {
      border-color: var(--brand-gold);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }

    .idea-card.status-completed {
      opacity: 0.7;
      border-color: rgba(16, 185, 129, 0.4);
      background: rgba(16, 185, 129, 0.04);
    }

    .idea-card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .idea-client-tag {
      font-size: 11.5px;
      font-weight: 800;
      color: var(--brand-gold-light);
      background: rgba(199, 148, 65, 0.15);
      border: 1px solid rgba(199, 148, 65, 0.35);
      padding: 2px 8px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .idea-title {
      font-size: 15.5px;
      font-weight: 800;
      color: var(--text-main);
      line-height: 1.4;
    }

    .idea-desc {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.5;
      background: var(--bg-secondary);
      padding: 10px 12px;
      border-radius: var(--radius-md);
      border-right: 3px solid var(--brand-gold);
      white-space: pre-wrap;
    }

    .idea-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: auto;
      padding-top: 10px;
      border-top: 1px solid var(--border-subtle);
    }

    .idea-status-btn {
      font-size: 11.5px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid transparent;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: var(--transition);
    }

    .idea-status-btn.new {
      background: rgba(199, 148, 65, 0.15);
      color: var(--brand-gold-light);
      border-color: rgba(199, 148, 65, 0.4);
    }

    .idea-status-btn.in_progress {
      background: rgba(14, 165, 233, 0.15);
      color: #38bdf8;
      border-color: rgba(14, 165, 233, 0.4);
    }

    .idea-status-btn.completed {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
      border-color: rgba(16, 185, 129, 0.4);
    }

    .btn-convert-idea {
      background: linear-gradient(135deg, var(--brand-forest), #1e3a27);
      color: #ffffff;
      border: 1px solid var(--brand-gold);
      font-weight: 800;
      font-size: 12px;
      padding: 6px 12px;
      border-radius: var(--radius-md);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: var(--transition);
    }

    .btn-convert-idea:hover {
      background: var(--brand-forest);
      transform: translateY(-1px);
      box-shadow: 0 2px 8px var(--accent-glow);
    }

    /* --- CLIENT PROFILE LINKS & BILLING STYLES --- */
    .client-links-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px;
    }

    .client-link-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 9px;
      border-radius: var(--radius-sm);
      font-size: 11.5px;
      font-weight: 700;
      text-decoration: none;
      transition: var(--transition);
      border: 1px solid transparent;
    }

    .link-fb { background: rgba(24, 119, 242, 0.12); color: #60a5fa; border-color: rgba(24, 119, 242, 0.3); }
    .link-fb:hover { background: rgba(24, 119, 242, 0.25); color: #93c5fd; }

    .link-ig { background: rgba(225, 48, 108, 0.12); color: #f472b6; border-color: rgba(225, 48, 108, 0.3); }
    .link-ig:hover { background: rgba(225, 48, 108, 0.25); color: #fbcfe8; }

    .link-tt { background: rgba(255, 255, 255, 0.08); color: #f3f4f6; border-color: rgba(255, 255, 255, 0.2); }
    .link-tt:hover { background: rgba(255, 255, 255, 0.18); }

    .link-drive { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
    .link-drive:hover { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }

    .link-wa { background: rgba(37, 211, 102, 0.12); color: #4ade80; border-color: rgba(37, 211, 102, 0.3); }
    .link-wa:hover { background: rgba(37, 211, 102, 0.25); color: #86efac; }

    .link-web { background: rgba(14, 165, 233, 0.12); color: #38bdf8; border-color: rgba(14, 165, 233, 0.3); }
    .link-web:hover { background: rgba(14, 165, 233, 0.25); color: #7dd3fc; }

    /* Client Billing Status Box */
    .client-billing-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 9px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .billing-badge-ok {
      background: rgba(16, 185, 129, 0.12);
      color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.35);
      padding: 3px 8px;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .billing-badge-warning {
      background: rgba(245, 158, 11, 0.15);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.4);
      padding: 3px 8px;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .billing-badge-danger {
      background: rgba(239, 68, 68, 0.15);
      color: #f87171;
      border: 1px solid rgba(239, 68, 68, 0.4);
      padding: 3px 8px;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .btn-renew-payment {
      background: rgba(199, 148, 65, 0.15);
      color: var(--brand-gold-light);
      border: 1px solid rgba(199, 148, 65, 0.35);
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: var(--transition);
    }

    .btn-renew-payment:hover {
      background: var(--brand-gold);
      color: #0b1610;
    }

    /* Hijri Date Picker & Calendar Styles */
    .btn-hijri-preset {
      background: var(--bg-hover);
      color: var(--text-muted);
      border: 1px solid var(--border-color);
      font-size: 10.5px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: var(--transition);
      font-family: inherit;
    }

    .btn-hijri-preset:hover, .btn-hijri-preset:focus {
      background: rgba(199, 148, 65, 0.2);
      color: var(--brand-gold-light);
      border-color: var(--brand-gold);
    }

    .hijri-cal-popup {
      background: var(--bg-card);
      border: 1.5px solid var(--brand-gold);
      border-radius: var(--radius-md);
      padding: 12px;
      margin-top: 10px;
      box-shadow: var(--shadow-lg);
      animation: fadeIn 0.18s ease-out;
    }

    .hijri-cal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .cal-nav-btn {
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      color: var(--text-main);
      padding: 4px 10px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 12px;
      transition: var(--transition);
    }

    .cal-nav-btn:hover {
      border-color: var(--brand-gold);
      color: var(--brand-gold);
    }

    .hijri-cal-weekdays {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .hijri-cal-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;
    }

    .hijri-cal-day {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 32px;
      border-radius: 6px;
      background: var(--bg-input);
      border: 1px solid transparent;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-main);
      cursor: pointer;
      transition: var(--transition);
      user-select: none;
      font-family: inherit;
    }

    .hijri-cal-day:hover {
      background: var(--bg-hover);
      border-color: var(--brand-gold);
      color: var(--brand-gold-light);
    }

    .hijri-cal-day.selected {
      background: var(--brand-gold);
      color: #0b1610;
      font-weight: 800;
      border-color: var(--brand-gold-light);
    }

    .hijri-cal-day.today {
      border-color: var(--accent);
      color: var(--accent);
    }

    .hijri-cal-day.empty {
      background: transparent;
      border: none;
      cursor: default;
      pointer-events: none;
    }

    /* Modal Form Sections Navigation */
    .form-section-tabs {
      display: flex;
      gap: 6px;
      border-bottom: 1.5px solid var(--border-color);
      padding-bottom: 10px;
      margin-bottom: 12px;
      overflow-x: auto;
    }

    .form-section-btn {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      padding: 6px 12px;
      border-radius: var(--radius-md);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      white-space: nowrap;
    }

    .form-section-btn.active {
      background: var(--brand-forest);
      color: #ffffff;
      border-color: var(--brand-gold);
    }

  
    /* --- WHITE PAPER SCRATCHPAD STYLES --- */
    .scratchpad-container {
      background: var(--bg-card);
      border: 1.5px solid var(--border-color);
      border-radius: var(--radius-xl);
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-shadow: var(--shadow-sm);
      transition: var(--transition);
    }

    .scratchpad-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      padding-bottom: 14px;
      border-bottom: 1.5px solid var(--border-subtle);
    }

    .scratchpad-title-group {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
    }

    .scratchpad-title {
      font-size: 18px;
      font-weight: 800;
      color: var(--text-main);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .scratchpad-autosave-indicator {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 700;
      color: var(--success);
      background: rgba(16, 185, 129, 0.12);
      border: 1px solid rgba(16, 185, 129, 0.3);
      padding: 3px 10px;
      border-radius: 20px;
      transition: opacity 0.2s ease;
    }

    .scratchpad-autosave-indicator.saving {
      color: var(--brand-gold);
      background: rgba(199, 148, 65, 0.15);
      border-color: rgba(199, 148, 65, 0.4);
    }

    .save-dot {
      width: 7px;
      height: 7px;
      background: currentColor;
      border-radius: 50%;
    }

    .scratchpad-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .white-paper-wrapper {
      position: relative;
      width: 100%;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    [data-theme="light"] .white-paper-wrapper {
      background: #ffffff;
      box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
    }

    .white-paper-textarea {
      width: 100%;
      min-height: 520px;
      height: 60vh;
      background: transparent;
      border: none;
      outline: none;
      resize: vertical;
      color: var(--text-main);
      font-family: 'Cairo', system-ui, sans-serif;
      font-size: 15.5px;
      font-weight: 600;
      line-height: 1.85;
      text-rendering: optimizeLegibility;
      direction: rtl;
    }

    .white-paper-textarea::placeholder {
      color: var(--text-subtle);
      opacity: 0.65;
      font-weight: 500;
      line-height: 1.9;
    }

    .scratchpad-footer-info {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      font-size: 12px;
      color: var(--text-muted);
      padding-top: 4px;
    }

    /* Client Mention Dropdown */
    .dropdown-wrapper {
      position: relative;
      display: inline-block;
    }

    .dropdown-menu {
      position: absolute;
      top: 100%;
      right: 0;
      z-index: 70;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-md);
      min-width: 200px;
      display: none;
      flex-direction: column;
      padding: 6px;
      margin-top: 4px;
    }

    .dropdown-menu.open {
      display: flex;
    }

    .dropdown-item {
      padding: 7px 12px;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--text-main);
      background: transparent;
      border: none;
      border-radius: var(--radius-sm);
      cursor: pointer;
      text-align: right;
      transition: var(--transition);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .dropdown-item:hover {
      background: var(--brand-forest);
      color: #ffffff;
    }

    @media (max-width: 768px) {
      .scratchpad-container {
        padding: 14px;
      }
      .white-paper-wrapper {
        padding: 12px 14px;
      }
      .white-paper-textarea {
        font-size: 15px;
        min-height: 420px;
      }
      .scratchpad-actions {
        width: 100%;
      }
      .scratchpad-actions .btn {
        flex: 1;
        min-width: 80px;
        padding: 7px 6px;
        font-size: 11.5px;
      }
    }

  
    /* Cloudflare Sync Status Badge */
    .cloud-sync-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      padding: 6px 12px;
      border-radius: var(--radius-md);
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      cursor: pointer;
      transition: var(--transition);
      user-select: none;
    }

    .cloud-sync-badge:hover {
      border-color: var(--accent);
      color: var(--text-main);
    }

    .cloud-sync-badge.synced {
      color: #34d399;
      border-color: rgba(16, 185, 129, 0.35);
      background: rgba(16, 185, 129, 0.08);
    }

    .cloud-sync-badge.syncing {
      color: var(--brand-gold-light);
      border-color: rgba(199, 148, 65, 0.35);
      background: rgba(199, 148, 65, 0.08);
    }

    .cloud-sync-badge.offline {
      color: var(--text-subtle);
    }


    /* Agency Security Lock Screen */
    .lock-screen-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(9, 18, 14, 0.95);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      z-index: 999999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    [data-theme="light"] .lock-screen-backdrop {
      background: rgba(246, 249, 247, 0.95);
    }

    .lock-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-xl);
      padding: 36px 30px;
      width: 100%;
      max-width: 440px;
      text-align: center;
      box-shadow: var(--shadow-lg);
      animation: lockAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes lockAppear {
      from { opacity: 0; transform: scale(0.95) translateY(10px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .lock-shield-badge {
      width: 68px;
      height: 68px;
      background: linear-gradient(135deg, rgba(199, 148, 65, 0.22), rgba(47, 87, 60, 0.28));
      border: 1.5px solid var(--brand-gold);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 30px;
      margin: 0 auto 16px auto;
      box-shadow: 0 0 24px rgba(199, 148, 65, 0.25);
    }

    .lock-title {
      font-size: 1.32rem;
      font-weight: 800;
      color: var(--brand-gold);
      margin-bottom: 6px;
    }

    .lock-subtitle {
      font-size: 0.86rem;
      color: var(--text-muted);
      margin-bottom: 24px;
      line-height: 1.5;
    }

    .lock-input-group {
      text-align: right;
      margin-bottom: 16px;
    }

    .lock-label {
      display: block;
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 8px;
    }

    .lock-input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
    }

    .lock-input {
      width: 100%;
      padding: 13px 16px;
      padding-left: 46px;
      background: var(--bg-secondary);
      border: 1.5px solid var(--border-color);
      border-radius: var(--radius-md);
      color: var(--text-main);
      font-size: 1.05rem;
      text-align: center;
      font-family: inherit;
      letter-spacing: 2px;
      transition: var(--transition);
    }

    .lock-input:focus {
      outline: none;
      border-color: var(--brand-gold);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .btn-lock-toggle {
      position: absolute;
      left: 10px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1.1rem;
      color: var(--text-muted);
      padding: 4px;
      display: flex;
      align-items: center;
    }

    .lock-error-msg {
      color: var(--danger);
      font-size: 0.84rem;
      font-weight: 600;
      margin-top: 8px;
      min-height: 20px;
      text-align: center;
    }

    .lock-submit-btn {
      width: 100%;
      padding: 13px 18px;
      font-size: 1.05rem;
      font-weight: 700;
      border-radius: var(--radius-md);
      justify-content: center;
      gap: 10px;
    }

    .lock-footer-hint {
      margin-top: 20px;
      font-size: 0.8rem;
      color: var(--text-subtle);
      border-top: 1px solid var(--border-subtle);
      padding-top: 16px;
    }

    .lock-footer-hint code {
      background: rgba(199, 148, 65, 0.15);
      color: var(--brand-gold);
      padding: 2px 7px;
      border-radius: 5px;
      font-family: monospace;
      font-weight: 700;
      letter-spacing: 1px;
    }

    @keyframes shakeAnimation {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-8px); }
      40%, 80% { transform: translateX(8px); }
    }

    .shake-error {
      animation: shakeAnimation 0.4s ease;
      border-color: var(--danger) !important;
    }

    /* ==========================================
       CLOUD SYNC BADGE & DIAGNOSTIC MODAL
       ========================================== */
    .cloud-sync-badge {
      cursor: pointer;
      user-select: none;
      transition: var(--transition);
    }

    .cloud-sync-badge:hover {
      filter: brightness(1.15);
      transform: translateY(-1px);
    }

    .cloud-sync-badge.unbound {
      background: rgba(245, 158, 11, 0.15) !important;
      color: var(--warning) !important;
      border-color: rgba(245, 158, 11, 0.4) !important;
      animation: pulseWarning 2s infinite ease-in-out;
    }

    @keyframes pulseWarning {
      0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
      50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
    }

    .diag-badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 700;
    }

    .diag-badge.success {
      background: rgba(16, 185, 129, 0.18);
      color: var(--success);
      border: 1px solid rgba(16, 185, 129, 0.35);
    }

    .diag-badge.warning {
      background: rgba(245, 158, 11, 0.18);
      color: var(--warning);
      border: 1px solid rgba(245, 158, 11, 0.35);
    }

    .diag-badge.info {
      background: rgba(14, 165, 233, 0.18);
      color: var(--info);
      border: 1px solid rgba(14, 165, 233, 0.35);
    }
