/* ═══ STUDIOHAUS PORTAL — Sidebar Styles ═══ */

    /* ─── ADMIN ─── */
    /* ─── APP SHELL (admin permanent sidebar layout) ─── */
    .app-shell {
      min-height: 100vh;
      position: relative;
      z-index: 1;
    }
    .app-content {
      margin-left: 240px;
      padding: 28px 36px;
      overflow-x: auto;
      overflow-y: auto;
      min-height: 100vh;
      background: radial-gradient(ellipse 120% 50% at 50% 100%, rgba(16,185,129,0.22) 0%, rgba(16,185,129,0.10) 25%, rgba(16,185,129,0.03) 50%, transparent 75%);
      background-size: 100% 200%;
      background-position: 50% 100%;
      transition: background-position 0.1s linear;
      animation: pageTransition 0.3s ease-out;
    }
    [data-theme="light"] .app-content {
      background: radial-gradient(ellipse 120% 50% at 50% 100%, rgba(16,163,74,0.12) 0%, rgba(16,163,74,0.05) 25%, rgba(16,163,74,0.01) 50%, transparent 75%);
    }
    @media (max-width: 768px) {
      .app-content { margin-left: 0; padding: 60px 16px 20px; }
    }
    .admin-sidebar {
      background: rgba(17, 17, 17, 0.85);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-right: 1px solid var(--border);
      padding: 0;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 240px;
      z-index: 100;
    }
    .admin-sidebar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 20px 20px 16px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 10px;
    }
    .admin-sidebar-brand-icon {
      width: 32px; height: 32px;
      border-radius: var(--radius-sm);
      background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 14px;
      color: #0a0a0a;
      flex-shrink: 0;
    }
    .admin-sidebar-brand-text {
      font-weight: 600;
      font-size: 1.2rem;
      color: var(--text);
      letter-spacing: -0.01em;
    }
    .admin-sidebar-label {
      font-size: 0.6rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-40);
      padding: 6px 20px 8px;
    }
    .admin-sidebar-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 16px;
      margin: 1px 8px;
      font-size: 0.85rem;
      color: var(--text-60);
      cursor: pointer;
      border: none;
      background: none;
      font-family: var(--font);
      width: calc(100% - 16px);
      text-align: left;
      transition: color 0.25s ease, background 0.3s ease, transform 0.15s ease;
      border-radius: var(--radius-sm);
      position: relative;
      overflow: hidden;
    }
    /* shimmer layer for hover */
    .admin-sidebar-item::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
      transform: translateX(-100%);
      transition: transform 0.4s ease;
      pointer-events: none;
    }
    .admin-sidebar-item:hover::after {
      transform: translateX(100%);
    }
    .admin-sidebar-item:hover {
      color: var(--text);
      background: rgba(255,255,255,0.03);
    }
    .admin-sidebar-item:active {
      transform: scale(0.97);
    }
    .admin-sidebar-item.active {
      color: #fff;
      background: linear-gradient(to right, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.06) 40%, transparent 100%);
    }
    .admin-sidebar-item.active::before {
      content: '';
      position: absolute;
      left: 0;
      top: 6px;
      bottom: 6px;
      width: 3px;
      border-radius: 0 3px 3px 0;
      background: #10b981;
      box-shadow: 0 0 8px 0 rgba(16, 185, 129, 0.4);
      animation: accentSlideIn 0.3s ease-out;
    }
    .admin-sidebar-item.active::after {
      transform: translateX(0);
      background: none;
    }
    @keyframes accentSlideIn {
      from { transform: scaleY(0); opacity: 0; }
      to { transform: scaleY(1); opacity: 1; }
    }
    .admin-sidebar-icon {
      width: 18px;
      height: 18px;
      opacity: 0.45;
      flex-shrink: 0;
      transition: opacity 0.25s ease, transform 0.2s ease, filter 0.25s ease;
    }
    .admin-sidebar-item:hover .admin-sidebar-icon { opacity: 0.7; }
    .admin-sidebar-item.active .admin-sidebar-icon { opacity: 1; filter: brightness(1.3) drop-shadow(0 0 3px rgba(16, 185, 129, 0.3)); }
    .admin-sidebar-divider {
      height: 1px;
      background: var(--border);
      margin: 14px 20px;
    }
    .admin-sidebar-footer {
      margin-top: auto;
      padding: 16px 20px;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.65rem;
      color: var(--text-40);
      letter-spacing: 0.05em;
    }
    .sidebar-theme-toggle {
      transform: scale(0.8);
      transform-origin: right center;
    }

    /* ─── Global Search ─── */
    .sidebar-search {
      padding: 8px 16px 12px;
    }
    .sidebar-search-input {
      width: 100%;
      padding: 8px 12px 8px 32px;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.04);
      color: var(--text);
      font-family: var(--font);
      font-size: 12px;
      border-radius: 100px;
      outline: none;
      transition: all 0.2s;
      position: relative;
    }
    .sidebar-search-input::placeholder { color: var(--text-40); }
    .sidebar-search-input:focus { border-color: rgba(16,185,129,0.3); background: rgba(255,255,255,0.07); }
    .sidebar-search-wrap {
      position: relative;
    }
    .sidebar-search-icon {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 14px;
      height: 14px;
      color: var(--text-40);
      pointer-events: none;
    }
    .search-results {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      max-height: 320px;
      overflow-y: auto;
      z-index: 200;
      box-shadow: 0 12px 40px rgba(0,0,0,0.3);
      margin-top: 4px;
    }
    .search-result-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      cursor: pointer;
      transition: background 0.15s;
      border-bottom: 1px solid var(--border);
    }
    .search-result-item:last-child { border-bottom: none; }
    .search-result-item:hover { background: var(--bg-card); }
    .search-result-type {
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 2px 6px;
      border-radius: 100px;
      font-weight: 600;
      flex-shrink: 0;
    }
    .search-result-type.project { background: rgba(59,130,246,0.15); color: #3b82f6; }
    .search-result-type.client { background: rgba(168,85,247,0.15); color: #a855f7; }
    .search-result-type.booking { background: rgba(16,185,129,0.15); color: #10b981; }
    .search-result-type.contractor { background: rgba(249,115,22,0.15); color: #f97316; }
    .search-result-name {
      font-size: 13px;
      color: var(--text);
      flex: 1;
    }
    .search-result-detail {
      font-size: 11px;
      color: var(--text-40);
    }
    .search-empty {
      padding: 16px;
      text-align: center;
      color: var(--text-40);
      font-size: 12px;
    }

    /* ─── Light mode for admin sidebar ─── */
    [data-theme="light"] .admin-sidebar {
      background: rgba(240, 239, 237, 0.95);
      border-right-color: rgba(0,0,0,0.08);
    }
    [data-theme="light"] .admin-sidebar-item {
      color: rgba(0,0,0,0.6);
    }
    [data-theme="light"] .admin-sidebar-item:hover {
      background: rgba(0,0,0,0.05);
      color: rgba(0,0,0,0.8);
    }
    [data-theme="light"] .admin-sidebar-item.active {
      background: rgba(0,0,0,0.08);
      color: #1a1a1a;
    }
    [data-theme="light"] .admin-sidebar-label {
      color: rgba(0,0,0,0.4);
    }
    [data-theme="light"] .admin-sidebar-brand-text {
      color: #1a1a1a;
    }
    [data-theme="light"] .admin-sidebar-footer {
      border-top-color: rgba(0,0,0,0.08);
      color: rgba(0,0,0,0.4);
    }
    [data-theme="light"] .sop-card-title { color: #fff; }
    [data-theme="light"] .sop-modal-title { color: #fff; }
    [data-theme="light"] .mon-person {
      background: rgba(0,0,0,0.08);
      color: #1a1a1a;
    }
    [data-theme="light"] .mon-person-empty {
      border-color: rgba(0,0,0,0.15);
    }
    [data-theme="light"] .mon-person-empty:hover {
      border-color: rgba(0,0,0,0.3);
      color: rgba(0,0,0,0.5);
    }
    [data-theme="light"] .modal {
      background: rgba(245, 245, 243, 0.88);
      border: 1px solid rgba(0,0,0,0.08);
      box-shadow: 0 24px 80px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.5);
    }
    [data-theme="light"] .admin-table th {
      color: rgba(0,0,0,0.5);
      border-bottom-color: rgba(0,0,0,0.08);
    }
    [data-theme="light"] .admin-table td {
      border-bottom-color: rgba(0,0,0,0.05);
    }
    [data-theme="light"] .sop-card {
      border-color: rgba(0,0,0,0.1);
    }
    [data-theme="light"] .sop-card:hover {
      border-color: rgba(0,0,0,0.2);
    }

    .admin-content {
      padding: 28px 36px;
      overflow-x: auto;
      animation: contentFadeIn 0.3s ease;
    }
    @keyframes contentFadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @media (max-width: 768px) {
      .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0;
      }
      .admin-sidebar-brand, .admin-sidebar-label, .admin-sidebar-divider, .admin-sidebar-footer { display: none; }
      .admin-sidebar-item {
        white-space: nowrap;
        padding: 12px 16px;
        margin: 0;
        width: auto;
        border-radius: 0;
        border-bottom: 2px solid transparent;
      }
      .admin-sidebar-item.active::before { display: none; }
      .admin-sidebar-item.active { border-bottom: 2px solid #10b981; background: linear-gradient(to bottom, transparent, rgba(16, 185, 129, 0.1)); box-shadow: none; }
      .app-shell { grid-template-columns: 1fr; }
      .app-content { padding: 60px 16px 20px; }
    }

    /* Legacy tab styles kept for compat */
    .admin-tabs { display: none; }
    .admin-tab { display: none; }

