/* ---- RAWR brand faces -------------------------------------------------
       Switzer carries everything; Aspekta is reserved for the uppercase labels,
       exactly as the brand book uses them. Weights match the site build. */
    @font-face { font-family:'Switzer'; src:url('/fonts/switzer-400.woff2') format('woff2'); font-weight:400; font-display:swap; }
    @font-face { font-family:'Switzer'; src:url('/fonts/switzer-500.woff2') format('woff2'); font-weight:500; font-display:swap; }
    @font-face { font-family:'Switzer'; src:url('/fonts/switzer-600.woff2') format('woff2'); font-weight:600; font-display:swap; }
    @font-face { font-family:'Switzer'; src:url('/fonts/switzer-700.woff2') format('woff2'); font-weight:700; font-display:swap; }
    @font-face { font-family:'Switzer'; src:url('/fonts/switzer-800.woff2') format('woff2'); font-weight:800; font-display:swap; }
    @font-face { font-family:'Aspekta'; src:url('/fonts/aspekta-500.woff2') format('woff2'); font-weight:500; font-display:swap; }
    @font-face { font-family:'Aspekta'; src:url('/fonts/aspekta-800.woff2') format('woff2'); font-weight:800; font-display:swap; }

    :root {
      /* ---- RAWR palette ---------------------------------------------------
         Values are the canonical brand ones (Figma BrandBook), not eyeballed:
         one accent, near-black ink, off-white paper. --accent-blue is kept as
         an alias because ~40 inline styles still ask for it by that name;
         it now resolves to the brand orange, so they rebrand for free. */
      --ink: #07060C;
      --ink-2: #0A090F;
      --ink-3: #121117;
      --accent: #FF8F5D;
      --accent-strong: #F2764A;
      --accent-soft: rgba(255, 143, 93, 0.12);

      /* Light theme (default) */
      --bg-main: #EFEFEF;
      --bg-sidebar: var(--ink);
      --bg-card: #FFFFFF;
      --border-color: #E2E2E2;
      --text-main: #07060C;
      --text-muted: #56555B;
      --text-active: #07060C;
      --bg-input: #FFFFFF;
      --accent-blue: var(--accent);
      --accent-cyan: var(--accent-strong);
      --accent-purple: var(--accent);
      --accent-rose: #C23636;
      --accent-green: #36C24F;
      --shadow-main: 0 1px 2px rgba(7, 6, 12, 0.04), 0 8px 24px -12px rgba(7, 6, 12, 0.10);
      --transition-speed: 0.2s;

      /* Shape + rhythm, so radii and gaps stop being decided per component. */
      --radius-sm: 8px;
      --radius: 12px;
      --radius-lg: 18px;
      --radius-pill: 999px;
      --gutter: 24px;
      --tracking: -0.02em;
    }

    body.dark-theme {
      /* Dark theme — the brand's own near-black, not a blue-grey */
      --bg-main: var(--ink);
      --bg-sidebar: var(--ink-2);
      --bg-card: var(--ink-3);
      --border-color: rgba(255, 255, 255, 0.09);
      --text-main: #EFEFEF;
      --text-muted: #8A8890;
      --text-active: #FFFFFF;
      --bg-input: rgba(10, 9, 15, 0.85);
      --accent-blue: var(--accent);
      --accent-cyan: var(--accent-strong);
      --accent-purple: var(--accent);
      --accent-rose: #E05A5A;
      --accent-green: #4FD466;
      --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    }

    @keyframes pulse-badge {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }



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

    body {
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      background-color: var(--bg-main);
      color: var(--text-main);
      min-height: 100vh;
      display: flex;
      overflow-x: hidden;
      transition: background-color var(--transition-speed), color var(--transition-speed);
    }

    /* App Container Layout */
    .app-container {
      display: flex;
      width: 100%;
      min-height: 100vh;
    }

    /* Left Sidebar Navigation */
    .sidebar {
      width: 260px;
      background-color: var(--bg-sidebar);
      border-right: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      transition: width var(--transition-speed) ease;
      z-index: 100;
      color: #94A3B8;
    }

    .sidebar.collapsed {
      width: 80px;
    }

    /* Sidebar Header */
    .sidebar-header {
      padding: 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.03);
      overflow: hidden;
    }

    .logo-section {
      display: flex;
      align-items: center;
      gap: 12px;
      white-space: nowrap;
    }

    .logo-icon {
      width: 32px;
      height: 32px;
      background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
      border-radius: 8px;
      flex-shrink: 0;
    }

    .logo-text {
      font-size: 18px;
      font-weight: 700;
      letter-spacing: 0.5px;
      color: #F8FAFC;
    }

    .collapse-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: #94A3B8;
      border-radius: 6px;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-weight: bold;
      transition: background 0.2s;
    }

    .collapse-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #F8FAFC;
    }

    /* Sidebar Search */
    .sidebar-search {
      padding: 16px;
      position: relative;
      overflow: hidden;
    }

    .sidebar-search input {
      width: 100%;
      background: rgba(15, 23, 42, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      padding: 10px 12px 10px 36px;
      color: #F1F5F9;
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 13px;
      outline: none;
      transition: border-color 0.2s;
    }

    .sidebar-search input:focus {
      border-color: rgba(255, 255, 255, 0.15);
    }

    .search-icon-svg {
      position: absolute;
      left: 28px;
      top: 27px;
      width: 14px;
      height: 14px;
      stroke: #64748B;
    }

    .sidebar.collapsed .sidebar-search {
      display: none;
    }

    /* Collapsed rail: the labels are hidden, so surface them on hover.
       Without this the rail is eight anonymous icons. */
    .menu-btn {
      position: relative;
    }

    .sidebar.collapsed .menu-btn::after {
      content: attr(data-label);
      position: absolute;
      left: calc(100% + 12px);
      top: 50%;
      transform: translateY(-50%);
      background: #1E293B;
      color: #F8FAFC;
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 6px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.12s ease;
      z-index: 200;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .sidebar.collapsed .menu-btn:hover::after,
    .sidebar.collapsed .menu-btn:focus-visible::after {
      opacity: 1;
      visibility: visible;
    }

    /* Keyboard focus was entirely invisible across the panel. */
    .menu-btn:focus-visible,
    .collapse-btn:focus-visible,
    .logout-btn:focus-visible,
    .sidebar-search input:focus-visible {
      outline: 2px solid var(--accent-cyan, #22D3EE);
      outline-offset: 2px;
    }

    /* Sidebar is fixed-width and never shrank; on narrow screens it ate the
       viewport. Below 640px it overlays the content instead of displacing it. */
    @media (max-width: 640px) {
      .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100%;
      }

      .sidebar:not(.collapsed) {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
      }

      .main-content {
        margin-left: 80px;
      }
    }

    /* Navigation Menu */
    .sidebar-menu {
      flex-grow: 1;
      padding: 16px 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      overflow-y: auto;
    }

    .menu-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      background: transparent;
      border: none;
      color: #94A3B8;
      padding: 10px 16px;
      border-radius: 8px;
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 14px;
      font-weight: 500;
      text-align: left;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
      overflow: hidden;
      width: 100%;
    }

    .menu-btn:hover {
      color: #F8FAFC;
      background: rgba(255, 255, 255, 0.02);
    }

    .menu-btn.active {
      color: #FFFFFF;
      background: var(--accent-blue);
      box-shadow: 0 4px 12px rgba(255, 143, 93, 0.2);
    }

    .menu-icon {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      flex-shrink: 0;
    }

    .sidebar.collapsed .tab-label {
      display: none;
    }

    .sidebar.collapsed .menu-btn {
      justify-content: center;
      padding: 10px;
    }

    /* User Profile Card Footer */
    .sidebar-profile {
      padding: 16px;
      border-top: 1px solid rgba(255, 255, 255, 0.03);
      display: flex;
      align-items: center;
      gap: 12px;
      overflow: hidden;
    }

    .profile-avatar {
      width: 36px;
      height: 36px;
      background: linear-gradient(135deg, var(--accent-purple), var(--accent-rose));
      border-radius: 50%;
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 14px;
      flex-shrink: 0;
    }

    .profile-details {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      flex-grow: 1;
      white-space: nowrap;
    }

    .profile-name {
      font-size: 13px;
      font-weight: 600;
      color: #F1F5F9;
    }

    .profile-role {
      font-size: 11px;
      color: #64748B;
    }

    .logout-btn {
      background: transparent;
      border: none;
      color: #64748B;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color 0.2s;
      flex-shrink: 0;
    }

    .logout-btn:hover {
      color: #F1F5F9;
    }

    .logout-icon {
      width: 18px;
      height: 18px;
    }

    .sidebar.collapsed .profile-details,
    .sidebar.collapsed .logout-btn {
      display: none;
    }

    .sidebar.collapsed .sidebar-profile {
      justify-content: center;
      padding: 16px 0;
    }

    /* Main Content Container */
    .main-content {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      background-color: var(--bg-main);
      min-width: 0;
      overflow-x: hidden;
      transition: background-color var(--transition-speed);
    }

    /* Top Main Header */
    .main-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 24px 32px;
      border-bottom: 1px solid var(--border-color);
      background-color: var(--bg-card);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      transition: background-color var(--transition-speed), border-color var(--transition-speed);
    }

    .header-title-section h1 {
      font-size: 24px;
      font-weight: 700;
      letter-spacing: -0.5px;
    }

    .theme-toggle-btn {
      background: rgba(255, 143, 93, 0.06);
      border: 1px solid var(--border-color);
      color: var(--text-main);
      padding: 10px;
      border-radius: 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .theme-toggle-btn:hover {
      background: rgba(255, 143, 93, 0.12);
    }

    .theme-icon {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
    }

    /* Content Body Scroll Area */
    .content-body {
      flex-grow: 1;
      padding: 32px;
      overflow-y: auto;
      overflow-x: hidden;
      min-width: 0;
      box-sizing: border-box;
    }

    /* Tab Panels */
    .tab-panel {
      display: none;
      flex-direction: column;
      gap: 24px;
    }

    .tab-panel.active {
      display: flex;
    }

    /* Cards & Layout Modules */
    .card {
      background: var(--bg-card);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      box-shadow: var(--shadow-main);
      transition: background var(--transition-speed), border var(--transition-speed), box-shadow var(--transition-speed);
    }

    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .card-title {
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text-muted);
      font-weight: 600;
    }

    .card-icon {
      width: 20px;
      height: 20px;
      stroke: var(--text-muted);
      fill: none;
      stroke-width: 2;
    }

    .metric-value {
      font-size: 32px;
      font-weight: 700;
      color: var(--text-main);
      letter-spacing: -1px;
    }

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

    .chart-container {
      position: relative;
      height: 110px;
      width: 100%;
    }

    /* Dashboard Grid System */
    .dashboard-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 24px;
    }

    @media (max-width: 1200px) {
      .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 640px) {
      .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    }

    .lower-section {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
    }

    /* Processes & Tables styling */
    .process-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      height: auto;
      min-height: 320px;
      overflow: hidden;
      box-shadow: var(--shadow-main);
      min-width: 0;
    }

    .process-header {
      margin-bottom: 16px;
      border-bottom: 1px solid var(--border-color);
      padding-bottom: 12px;
    }

    .process-title {
      font-size: 16px;
      font-weight: 600;
    }

    .process-table-container {
      flex-grow: 1;
      overflow-y: auto;
    }

    .process-table {
      width: 100%;
      border-collapse: collapse;
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 13px;
      text-align: left;
    }

    .process-table th {
      color: var(--text-muted);
      font-weight: 600;
      padding: 10px 8px;
      border-bottom: 1px solid var(--border-color);
    }

    .process-table td {
      padding: 12px 8px;
      border-bottom: 1px solid var(--border-color);
      color: var(--text-main);
    }

    .process-table tr:hover td {
      background: rgba(255, 143, 93, 0.03);
    }

    .monospaced-cell {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
    }

    /* Buttons styling */
    .action-btn {
      background: var(--accent-blue);
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 8px;
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, transform 0.1s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .action-btn:hover { background: var(--accent-strong); }
    .action-btn:active { transform: scale(0.98); }
    .action-btn.secondary { background: rgba(255, 143, 93, 0.05); border: 1px solid var(--border-color); color: var(--text-main); }
    .action-btn.secondary:hover { background: rgba(255, 143, 93, 0.1); }
    .action-btn.small { padding: 6px 12px; font-size: 11px; border-radius: 6px; }
    .action-btn.danger { background: var(--accent-rose); }
    .action-btn.danger:hover { background: #cc0066; }
    .action-btn:disabled { background: var(--text-muted); cursor: not-allowed; opacity: 0.5; }

    /* Forms */
    .form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

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

    .form-input {
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 10px 14px;
      color: var(--text-main);
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s;
    }

    .form-input:focus { border-color: var(--accent-blue); }

    .select-dropdown {
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      color: var(--text-main);
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 13px;
      padding: 10px 14px;
      border-radius: 8px;
      outline: none;
    }

    /* Visual Editors Layouts */
    .editor-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      gap: 24px;
      min-height: 480px;
    }

    @media (max-width: 900px) {
      .editor-layout { grid-template-columns: minmax(0, 1fr); }
    }

    .directory-tree {
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 16px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .tree-node {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      padding: 8px 10px;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-main);
    }

    .tree-node:hover {
      background: rgba(255, 143, 93, 0.05);
    }

    .tree-node.directory {
      color: var(--text-main);
      font-weight: 600;
    }

    .tree-node:hover { background: var(--accent-soft); color: var(--accent); }

    .editor-pane {
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .editor-textarea {
      width: 100%;
      flex-grow: 1;
      background: var(--ink);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 16px;
      color: #EFEFEF;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      resize: none;
      outline: none;
    }

    .editor-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    /* Database Layout */
    .db-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      gap: 24px;
    }

    @media (max-width: 900px) {
      .db-layout { grid-template-columns: minmax(0, 1fr); }
    }

    /* WordPress Manager */
    .wp-detail-container {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      gap: 24px;
    }

    @media (max-width: 900px) {
      .wp-detail-container { grid-template-columns: minmax(0, 1fr); }
    }

    .wp-meta-list {
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      font-size: 13px;
    }

    .wp-meta-item {
      display: flex;
      justify-content: space-between;
      border-bottom: 1px solid var(--border-color);
      padding-bottom: 8px;
    }

    /* Log display layout */
    .log-display {
      background: var(--ink);
      color: #C8C8C8;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      padding: 16px;
      border-radius: 12px;
      border: 1px solid var(--border-color);
      height: 380px;
      overflow-y: auto;
      white-space: pre-wrap;
      word-break: break-all;
    }

    .log-controls {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }

    /* Console Assistant chat */
    .console-messages {
      flex-grow: 1;
      padding: 20px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 14px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
    }

    .message {
      max-width: 85%;
      padding: 12px 16px;
      border-radius: 12px;
      line-height: 1.5;
      white-space: pre-wrap;
    }

    .message.user {
      align-self: flex-end;
      background: rgba(121, 40, 202, 0.15);
      border: 1px solid rgba(121, 40, 202, 0.25);
      color: var(--text-main);
    }

    .message.assistant {
      align-self: flex-start;
      background: rgba(255, 143, 93, 0.1);
      border: 1px solid rgba(255, 143, 93, 0.18);
      color: var(--text-main);
    }

    .message.system {
      align-self: center;
      background: rgba(142, 154, 171, 0.08);
      border: 1px solid rgba(142, 154, 171, 0.15);
      color: var(--text-muted);
      font-size: 12px;
      max-width: 100%;
      text-align: center;
    }

    /* Hostinger Grid Panel styling */
    .hostinger-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 24px;
    }

    @media (max-width: 1024px) {
      .hostinger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 640px) {
      .hostinger-grid { grid-template-columns: minmax(0, 1fr); }
    }

    .hostinger-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 24px;
      box-shadow: var(--shadow-main);
    }

    .sub-item-card {
      background: rgba(255, 143, 93, 0.02);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 14px;
      margin-bottom: 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .sub-item-name {
      font-size: 14px;
      font-weight: 600;
    }

    .sub-item-meta {
      font-size: 11px;
      color: var(--text-muted);
    }

    .status-active-badge {
      font-size: 11px;
      color: var(--accent-green);
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.2);
      padding: 2px 8px;
      border-radius: 12px;
      font-weight: 600;
    }

    .status-cancelled-badge {
      font-size: 11px;
      color: var(--text-muted);
      background: rgba(107, 114, 128, 0.1);
      border: 1px solid rgba(107, 114, 128, 0.2);
      padding: 2px 8px;
      border-radius: 12px;
      font-weight: 600;
    }

    /* Hostinger-style website installations styles */
    .website-list-container {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 16px;
    }
    
    .website-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 16px 20px;
      transition: all 0.2s ease;
      position: relative;
    }
    
    .website-row:hover {
      border-color: rgba(255, 143, 93, 0.4);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      transform: translateY(-1px);
    }
    
    .website-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    
    .website-domain-container {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .website-domain-link {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-main);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: color 0.2s;
    }
    
    .website-domain-link:hover {
      color: var(--accent-blue);
    }
    
    .website-domain-link svg {
      width: 14px;
      height: 14px;
      stroke: var(--text-muted);
      transition: stroke 0.2s;
    }
    
    .website-domain-link:hover svg {
      stroke: var(--accent-blue);
    }
    
    .website-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px;
    }
    
    .website-badge {
      display: inline-flex;
      align-items: center;
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 6px;
    }
    
    .website-badge.active {
      background: rgba(0, 223, 137, 0.08);
      color: var(--accent-green);
      border: 1px solid rgba(0, 223, 137, 0.2);
    }
    
    .website-badge.tag {
      background: rgba(121, 40, 202, 0.08);
      color: var(--accent-purple);
      border: 1px solid rgba(121, 40, 202, 0.2);
    }
    
    .website-badge.favorite {
      background: rgba(255, 215, 0, 0.1);
      color: #FFD700;
      border: 1px solid rgba(255, 215, 0, 0.3);
    }
    
    .website-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .hostinger-btn {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--text-main);
      padding: 8px 14px;
      border-radius: 8px;
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
    }
    
    .hostinger-btn:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.15);
    }
    
    .hostinger-btn.solid {
      background: var(--accent-blue);
      border-color: var(--accent-blue);
      color: white;
    }
    
    .hostinger-btn.solid:hover {
      background: var(--accent-strong);
      border-color: var(--accent-strong);
    }
    
    /* Dropdown Styles */
    .dropdown-container {
      position: relative;
      display: inline-block;
    }
    
    .dropdown-menu {
      display: none;
      position: absolute;
      right: 0;
      top: 100%;
      margin-top: 6px;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      border-radius: 8px;
      padding: 6px;
      z-index: 1000;
      min-width: 160px;
    }
    
    .dropdown-menu.show {
      display: block;
    }
    
    .dropdown-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      color: var(--text-main);
      font-size: 13px;
      font-weight: 500;
      text-decoration: none;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }
    
    .dropdown-item:hover {
      background: var(--bg-main);
      color: var(--accent-blue);
    }
    
    .dropdown-item.danger {
      color: var(--accent-rose);
    }
    
    .dropdown-item.danger:hover {
      background: rgba(255, 84, 84, 0.1);
      color: var(--accent-rose);
    }

    /* Client List Styles */
    .client-row:hover {
      border-color: rgba(255, 143, 93, 0.4) !important;
      background: var(--bg-card) !important;
    }
    .client-row.active {
      border-color: var(--accent-blue) !important;
      background: rgba(255, 143, 93, 0.05) !important;
      box-shadow: 0 0 0 2px rgba(255, 143, 93, 0.1);
    }

    /* Sub-tabs Navigation Bar styling */
    .sub-tabs-container {
      display: flex;
      gap: 24px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 24px;
      padding-bottom: 4px;
    }
    
    .sub-tab-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 14px;
      font-weight: 600;
      font-family: 'Switzer', system-ui, -apple-system, sans-serif;
      cursor: pointer;
      padding: 8px 4px;
      position: relative;
      transition: color 0.2s;
    }
    
    .sub-tab-btn:hover {
      color: var(--text-main);
    }
    
    .sub-tab-btn.active {
      color: var(--accent-blue);
    }
    
    .sub-tab-btn.active::after {
      content: '';
      position: absolute;
      bottom: -6px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--accent-blue);
      border-radius: 2px;
    }
    
    .sub-panel {
      display: none;
    }
    
    .sub-panel.active {
      display: block;
    }

    /* Collapsed logo text override */
    .sidebar.collapsed .logo-text {
      display: none;
    }

    /* Clean icon-only button design */
    .icon-btn {
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--text-main);
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .icon-btn:hover {
      background: rgba(255, 143, 93, 0.05);
      border-color: var(--accent-blue);
      color: var(--accent-blue);
      box-shadow: 0 2px 8px rgba(255, 143, 93, 0.1);
    }

    .icon-btn.solid {
      background: var(--accent-blue);
      border-color: var(--accent-blue);
      color: white;
    }

    .icon-btn.solid:hover {
      background: var(--accent-strong);
      border-color: var(--accent-strong);
      color: white;
      box-shadow: 0 4px 12px rgba(255, 143, 93, 0.2);
    }
      /* =====================================================================
       RAWR design layer
       Sits after the base rules on purpose: it restyles the shared components
       (nav, cards, buttons, inputs, tables, badges, dialogs) onto the brand's
       type and colour without touching any layout the app depends on.
       ===================================================================== */

    body {
      letter-spacing: var(--tracking);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    ::selection { background: var(--accent); color: #07060C; }

    /* Native controls follow the brand instead of the browser's blue. */
    input[type="checkbox"], input[type="radio"], input[type="range"], progress {
      accent-color: var(--accent);
    }

    /* Uppercase micro-labels are Aspekta in the brand book — card titles,
       table headers and form labels are exactly that role. */
    .card-title,
    .form-label,
    .process-table th,
    .sub-item-meta {
      font-family: 'Aspekta', 'Switzer', sans-serif;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 11px;
      font-weight: 800;
      color: var(--text-muted);
    }

    h1, h2, h3, .metric-value, .card-title-lg {
      letter-spacing: -0.03em;
    }

    .metric-value { font-weight: 800; }

    /* ---- Sidebar ---- */
    .sidebar {
      border-right: none;
      color: rgba(239, 239, 239, 0.62);
      padding-bottom: 8px;
    }

    /* Brand mark, punched out of the accent tile so it reads at any theme. */
    .logo-icon {
      background: var(--accent);
      border-radius: 10px;
      position: relative;
    }

    .logo-icon { display: flex; align-items: center; justify-content: center; }
    .logo-icon img { width: 20px; height: auto; display: block; }

    .logo-text {
      font-weight: 800;
      letter-spacing: 0.02em;
    }

    .menu-btn {
      border-radius: var(--radius-sm);
      font-weight: 500;
      transition: background var(--transition-speed), color var(--transition-speed);
    }

    .menu-btn:hover {
      background: rgba(255, 255, 255, 0.06);
      color: #FFFFFF;
    }

    /* The active item reads as brand, not as a heavy blue slab. */
    .menu-btn.active {
      background: var(--accent-soft);
      color: var(--accent);
      box-shadow: none;
    }

    .menu-btn.active::before {
      content: '';
      position: absolute;
      left: -12px;
      top: 50%;
      transform: translateY(-50%);
      width: 3px;
      height: 18px;
      border-radius: 0 3px 3px 0;
      background: var(--accent);
    }

    .profile-avatar {
      background: var(--accent);
      color: #07060C;
      font-weight: 700;
    }

    .sidebar-search input {
      border-radius: var(--radius-sm);
    }

    /* ---- Header + surfaces ---- */
    .main-header {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      background-color: var(--bg-card);
    }

    .header-title-section h1 {
      font-weight: 800;
      letter-spacing: -0.035em;
    }

    .card,
    .process-card,
    .hostinger-card,
    .website-row {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-main);
    }

    .website-row {
      border-radius: var(--radius);
    }

    .website-row:hover {
      border-color: rgba(255, 143, 93, 0.45);
    }

    /* The metric cards were sized around a chart that is often empty, leaving
       half a card of dead space. Let them size to their content instead. */
    .card { gap: 12px; }

    /* ---- Buttons ---- */
    .action-btn {
      background: var(--accent);
      color: #07060C;
      border-radius: var(--radius-pill);
      padding: 10px 22px;
      font-weight: 600;
      letter-spacing: 0;
      box-shadow: none;
    }

    .action-btn:hover { background: var(--accent-strong); }
    .action-btn:active { transform: translateY(1px); }

    .action-btn.secondary,
    .hostinger-btn {
      border-radius: var(--radius-pill);
      font-weight: 600;
      border: 1px solid var(--border-color);
      background: var(--bg-card);
      color: var(--text-main);
    }

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

    .hostinger-btn.solid {
      background: var(--accent);
      border-color: var(--accent);
      color: #07060C;
    }

    .hostinger-btn.solid:hover {
      background: var(--accent-strong);
      border-color: var(--accent-strong);
      color: #07060C;
    }

    .action-btn.danger { background: var(--accent-rose); color: #FFFFFF; }
    .action-btn.danger:hover { background: #A82D2D; }

    .icon-btn {
      border-radius: var(--radius-sm);
      color: var(--text-muted);
    }

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

    /* One solid orange per site row read as noise across a long list — keep the
       emphasis, drop the shout. */
    .icon-btn.solid {
      background: var(--accent-soft);
      border-color: rgba(255, 143, 93, 0.35);
      color: var(--accent);
    }

    .icon-btn.solid:hover {
      background: var(--accent);
      border-color: var(--accent);
      color: #07060C;
    }

    /* One visible focus treatment for everything keyboard-reachable. */
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    [tabindex]:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      border-radius: var(--radius-sm);
    }

    /* ---- Inputs ---- */
    .form-input,
    .select-dropdown,
    input[type="text"],
    input[type="search"],
    input[type="password"],
    input[type="number"],
    textarea {
      border-radius: var(--radius-sm);
      font-family: 'Switzer', system-ui, sans-serif;
    }

    .form-input:focus,
    .select-dropdown:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }

    /* ---- Tables ---- */
    .process-table th {
      padding: 8px;
      border-bottom: 1px solid var(--border-color);
    }

    .process-table tr:hover td { background: var(--accent-soft); }

    /* ---- Badges ---- */
    .website-badge,
    .status-active-badge,
    .status-cancelled-badge {
      border-radius: var(--radius-pill);
      font-family: 'Aspekta', 'Switzer', sans-serif;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 10px;
    }

    .website-badge.favorite {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: rgba(255, 143, 93, 0.3);
    }

    /* ---- Scrollbars ---- */
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb {
      background: rgba(86, 85, 91, 0.32);
      border-radius: var(--radius-pill);
      border: 3px solid transparent;
      background-clip: content-box;
    }
    ::-webkit-scrollbar-thumb:hover { background: rgba(86, 85, 91, 0.55); background-clip: content-box; }
