/* ============================================================================
 * GIRI ORBIT — SOVEREIGN SUITE MODERN DASHBOARD THEME (m365-copilot.css)
 * Usability Heuristics Design System: Unified Typography, Colors, Radii & Buttons
 * ============================================================================
 */

:root {
  /* Heuristic #1: Typography Tokens (Unified 3-family stack) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  /* Heuristic #5: Consistent 7-Step Type Scale */
  --text-xs: 11px;      /* fine badges, sub-labels */
  --text-sm: 12px;      /* metadata, timestamps, tooltips */
  --text-base: 14px;    /* body text, button labels, inputs */
  --text-md: 16px;      /* section titles, card headers */
  --text-lg: 18px;      /* modal titles, prominent labels */
  --text-xl: 22px;      /* sub-hero headers */
  --text-2xl: 28px;     /* page hero headline */

  /* Heuristic #6: Standardized 6-Token Semantic Text Colors */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;
  --color-text-accent: #38bdf8;
  --color-text-inverse: #090d16;

  /* Heuristic #7: Consistent 4-Token Corner Radii */
  --radius-sm: 6px;     /* badges, fine tags, inner sheets */
  --radius-md: 10px;    /* buttons, inputs, dropdown items */
  --radius-lg: 14px;    /* cards, modal dialogs, search bar */
  --radius-full: 9999px;/* filter pills, circular icon wraps */

  /* Theme Surfaces */
  --m365-bg: #090d16;
  --m365-canvas: transparent;
  --m365-rail-bg: rgba(13, 19, 33, 0.94);
  --m365-rail-border: rgba(148, 163, 184, 0.12);
  --m365-text-main: var(--color-text-primary);
  --m365-text-muted: var(--color-text-muted);
  --m365-text-light: var(--color-text-subtle);
  --m365-border: rgba(148, 163, 184, 0.14);
  --m365-hover: rgba(255, 255, 255, 0.06);
  --m365-purple: #c084fc;
  --m365-blue: #38bdf8;
  --m365-card-radius: var(--radius-lg);
}

/* Master Layout: Full Screen Flex Container */
.m365-hub-root {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background: radial-gradient(circle at 14% 12%, rgba(37, 99, 235, 0.25) 0%, transparent 42%),
              radial-gradient(circle at 86% 16%, rgba(124, 58, 237, 0.22) 0%, transparent 45%),
              radial-gradient(circle at 50% 88%, rgba(13, 148, 136, 0.18) 0%, transparent 48%),
              radial-gradient(circle at 76% 68%, rgba(219, 39, 119, 0.15) 0%, transparent 44%),
              #090d16;
  background-attachment: fixed;
  color: var(--m365-text-main);
  font-family: var(--font-sans);
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

.m365-hub-root::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

/* ============================================================================
 * 1. LEFT NAVIGATION RAIL (Vertical Sidebar)
 * ============================================================================
 */
.m365-left-rail {
  width: 68px;
  min-width: 68px;
  height: 100vh;
  background: var(--m365-rail-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--m365-rail-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 14px 0;
  z-index: 50;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  overflow: hidden; /* Heuristic #4: Viewport bounds preserved */
}

/* Heuristic #3 & #4: Scrollable App Center with Pinned Global Actions */
.m365-rail-scroll-group {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.m365-rail-scroll-group::-webkit-scrollbar {
  width: 4px;
}
.m365-rail-scroll-group::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 4px;
}

.m365-rail-group-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-subtle);
  margin: 6px 0 2px 0;
  user-select: none;
}

.m365-rail-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.m365-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.m365-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 52px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 4px 2px;
  transition: all 0.15s ease;
  color: var(--m365-text-muted);
}

.m365-rail-btn:hover {
  background: #f8fafc;
  color: var(--m365-text-main);
}

.m365-rail-icon-wrap {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.m365-rail-btn.active .m365-rail-icon-wrap {
  background: rgba(124, 58, 237, 0.1);
  color: var(--m365-purple);
}

.m365-rail-btn.active .m365-rail-label {
  color: var(--m365-purple);
  font-weight: 700;
}

.m365-rail-label {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
}

.m365-rail-divider {
  width: 32px;
  height: 1px;
  background: var(--m365-border);
  margin: 6px 0;
}

.m365-rail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ============================================================================
 * 2. MAIN HUB WORKSPACE CANVAS
 * ============================================================================
 */
.m365-canvas {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background: transparent;
  padding: 36px 48px 64px 48px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.m365-canvas::-webkit-scrollbar {
  width: 8px;
}
.m365-canvas::-webkit-scrollbar-track {
  background: transparent;
}
.m365-canvas::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 4px;
}
.m365-canvas::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}

.m365-inner-wrapper {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Hero Section: Welcome to Giri Orbit Sovereign */
.m365-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 8px;
}

.m365-hero-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #93c5fd 70%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-shadow: 0 0 35px rgba(56, 189, 248, 0.2);
}

.m365-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--m365-text-muted);
}

.m365-badge-free {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.m365-storage-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
}

/* Global Search Bar */
.m365-search-wrap {
  width: 100%;
  max-width: 720px;
  margin: 4px auto 0 auto;
}

/* ============================================================================
 * 2. SEARCH BAR & SOCIAL HANDLES
 * ============================================================================
 */
.giri-social-handles-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 20px 0;
  flex-wrap: wrap;
}

.giri-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--color-text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.giri-social-pill:hover {
  transform: translateY(-1.5px);
  color: #ffffff;
}

.giri-social-pill.insta:hover {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.2), rgba(131, 58, 180, 0.2));
  border-color: #e1306c;
  box-shadow: 0 4px 14px rgba(225, 48, 108, 0.35);
}

.giri-social-pill.x-twitter:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #f8fafc;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.giri-social-pill.github:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: #a855f7;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.m365-search-wrap {
  position: relative;
  width: 100%;
  max-width: 660px;
  margin: 0 auto 28px auto;
}

.m365-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 0 16px;
  height: 48px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 1px rgba(56, 189, 248, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.m365-search-bar:focus-within {
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
}

.m365-search-bar input {
  flex: 1;
  height: 100%;
  min-height: 44px; /* Heuristic #9: Meets WCAG 44px hit-target */
  padding: 10px 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-base);
  color: var(--color-text-primary);
  font-family: inherit;
}

.m365-search-bar input::placeholder {
  color: #94a3b8;
}

.search-kbd-hint {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  padding: 2px 7px;
  user-select: none;
  letter-spacing: 0.5px;
}

/* Interactive Live Suggestions Dropdown */
.m365-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 1px rgba(56, 189, 248, 0.4);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px;
  scrollbar-width: thin;
}

.search-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  padding: 8px 12px 4px 12px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--color-text-primary);
}

.search-result-item:hover, .search-result-item.selected {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
}

.search-result-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search-result-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-result-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-desc {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.search-highlight {
  color: #38bdf8;
  font-weight: 700;
}

/* ============================================================================
 * 3. "CREATE NEW" CAROUSEL CARDS
 * ============================================================================
 */
.m365-create-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m365-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--m365-text-main);
  margin: 0;
}

.m365-cards-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  width: 100%;
}

@media (max-width: 1100px) {
  .m365-cards-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .m365-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.m365-create-card {
  background: rgba(18, 24, 38, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--m365-card-radius);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.m365-create-card:hover {
  transform: translateY(-7px) scale(1.025);
}

.m365-create-card[data-create="drift"]:hover {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.38), 0 0 20px rgba(56, 189, 248, 0.25);
}

.m365-create-card[data-create="kinetic"]:hover {
  border-color: rgba(251, 146, 60, 0.85);
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.38), 0 0 20px rgba(251, 146, 60, 0.25);
}

.m365-create-card[data-create="axis"]:hover {
  border-color: rgba(52, 211, 153, 0.85);
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.38), 0 0 20px rgba(52, 211, 153, 0.25);
}

.m365-create-card[data-create="form"]:hover {
  border-color: rgba(45, 212, 191, 0.85);
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.38), 0 0 20px rgba(45, 212, 191, 0.25);
}

.m365-create-card[data-create="quiz"]:hover {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.38), 0 0 20px rgba(56, 189, 248, 0.25);
}

.m365-create-card[data-create="list"]:hover {
  border-color: rgba(192, 132, 252, 0.85);
  box-shadow: 0 16px 36px rgba(124, 58, 237, 0.38), 0 0 20px rgba(192, 132, 252, 0.25);
}

.m365-create-card[data-create="designer"]:hover {
  border-color: rgba(244, 114, 182, 0.85);
  box-shadow: 0 16px 36px rgba(219, 39, 119, 0.38), 0 0 20px rgba(244, 114, 182, 0.25);
}

/* Miniature Visual Document Illustrations */
.m365-card-preview {
  width: 100%;
  height: 105px;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
}

/* 1. Word / Drift Preview (Light Blue) */
.preview-word {
  background: #f8faff;
}
.sheet-word {
  width: 58px;
  height: 74px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
  gap: 4px;
}
.line-blue {
  height: 4px;
  border-radius: 2px;
  background: #bfdbfe;
}

/* 2. PowerPoint / Kinetic Preview (Warm Peach) */
.preview-ppt {
  background: #fffaf5;
}
.sheet-ppt {
  width: 76px;
  height: 48px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.08);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ppt-top-bar {
  height: 6px;
  background: #fed7aa;
  border-radius: 2px;
  width: 50%;
}
.ppt-body-cols {
  display: flex;
  gap: 4px;
  flex: 1;
}
.ppt-body-col {
  flex: 1;
  background: #ffedd5;
  border-radius: 2px;
}

/* 3. Excel / Axis Preview (Mint Green Grid) */
.preview-excel {
  background: #f7fee7;
}
.sheet-excel {
  width: 70px;
  height: 56px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.08);
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}
.excel-cell {
  background: #dcfce7;
  border-radius: 1.5px;
}

/* 4. Form Preview (Teal) */
.preview-form {
  background: #f0fdfa;
}
.sheet-form {
  width: 58px;
  height: 74px;
  background: #ffffff;
  border: 1px solid #99f6e4;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.08);
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-bar {
  height: 5px;
  background: #99f6e4;
  border-radius: 2px;
  width: 70%;
}
.form-box {
  height: 12px;
  background: #ccfbf1;
  border-radius: 2px;
}

/* 5. Quiz Preview (Green) */
.preview-quiz {
  background: #f0fdf4;
}
.sheet-quiz {
  width: 58px;
  height: 74px;
  background: #ffffff;
  border: 1px solid #a7f3d0;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.08);
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 4px;
}
.quiz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
}
.quiz-line {
  flex: 1;
  height: 4px;
  background: #d1fae5;
  border-radius: 2px;
}

/* 6. List Preview (Purple) */
.preview-list {
  background: #faf5ff;
}
.sheet-list {
  width: 68px;
  height: 56px;
  background: #ffffff;
  border: 1px solid #e9d5ff;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.08);
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.list-row {
  height: 8px;
  background: #f3e8ff;
  border-radius: 2px;
}

/* 7. Design Preview (Pink / Magenta) */
.preview-designer {
  background: #fdf2f8;
}
.sheet-designer {
  width: 68px;
  height: 56px;
  background: #ffffff;
  border: 1px solid #fbcfe8;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.08);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.designer-circ {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #db2777);
}
.designer-rect {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

/* Corner App Badge on Previews */
.badge-corner {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1;
}
.badge-corner.badge-drift { background: #2563eb; }
.badge-corner.badge-kinetic { background: #ea580c; }
.badge-corner.badge-axis { background: #16a34a; }
.badge-corner.badge-forms { background: #0d9488; }
.badge-corner.badge-quiz { background: #0284c7; }
.badge-corner.badge-lists { background: #7c3aed; }
.badge-corner.badge-designer { background: #db2777; }

.m365-card-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 2px;
}

.m365-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--m365-text-main);
  line-height: 1.2;
}

.m365-card-sub {
  font-size: 11px;
  color: var(--m365-text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

.m365-see-more {
  color: #38bdf8;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.m365-see-more:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  transform: translateX(4px);
  color: #ffffff;
}

/* ============================================================================
 * 4. "QUICK ACCESS" SECTION (Document List & Filter Tabs)
 * ============================================================================
 */
.m365-quick-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m365-quick-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.m365-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m365-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--m365-border);
  background: rgba(18, 24, 38, 0.7);
  color: var(--m365-text-muted);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.m365-pill:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.3);
}

.m365-pill.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 14px rgba(37, 99, 235, 0.4);
}

.m365-action-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m365-upload-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-size: var(--text-sm) !important;
  font-weight: 700 !important;
  border: 1px solid #3b82f6 !important;
  background: #2563eb !important; /* Heuristic #11: High visual weight primary CTA */
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.m365-upload-btn:hover {
  background: #1d4ed8 !important;
  border-color: #60a5fa !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6) !important;
  transform: translateY(-1px) !important;
}
.m365-upload-btn svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}
.m365-upload-btn span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.m365-view-toggle {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-radius: var(--radius-sm) !important;
  padding: 3px !important;
  gap: 3px !important;
}

.m365-view-btn {
  background: transparent !important;
  border: none !important;
  padding: 6px 10px !important;
  cursor: pointer !important;
  color: #94a3b8 !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.m365-view-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.m365-view-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* Quick Access Document Table */
.m365-table-wrap {
  width: 100%;
  background: rgba(18, 24, 38, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--m365-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.m365-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.m365-table th {
  background: rgba(15, 23, 42, 0.85);
  padding: 12px 18px;
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 1px solid var(--m365-border);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.m365-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--m365-text-main);
  vertical-align: middle;
}

.m365-table tr {
  cursor: pointer;
  transition: background 0.1s ease;
}

.m365-table tr:hover {
  background: #f8fafc;
}

.m365-doc-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.m365-doc-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.m365-doc-subtext {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 1px;
}


/* Clean Full-Screen Viewport for Giri Orbit Hub */
body:not(.in-tool) .tier2-suite-header {
  display: none !important;
}
body:not(.in-tool) .orbit-workspace {
  height: 100vh !important;
  max-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* ============================================================================
 * 6. HERO DOWNLOAD BUTTON & GDRIVE STAT
 * ============================================================================
 */
.m365-hero-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  margin-left: 8px;
}
.m365-hero-download-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.m365-storage-stat {
  transition: color 0.15s ease;
}
.m365-storage-stat:hover {
  color: #2563eb;
}

/* ============================================================================
 * 7. EMPTY DOCUMENTS STATE
 * ============================================================================
 */
.m365-empty-docs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  margin: 12px 0;
}
.m365-empty-icon {
  font-size: 38px;
  margin-bottom: 12px;
  opacity: 0.85;
}
.m365-empty-docs h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}
.m365-empty-docs p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px 0;
  max-width: 420px;
  line-height: 1.5;
}
.m365-empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
/* Heuristic #8: Clean Action Hierarchy (Primary Solid vs Secondary Outline) */
.m365-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Primary Single Clear Starting Point */
.m365-empty-btn.primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.m365-empty-btn.primary:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}
/* Secondary Subordinate Options */
.m365-empty-btn.secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--color-text-secondary) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
}
.m365-empty-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--color-text-primary) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

/* ============================================================================
 * 8. MODAL FRAMEWORK (Settings, Google Drive Sovereign Account, Download Suite)
 * ============================================================================
 */
.giri-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: giriFadeIn 0.2s ease-out;
}
@keyframes giriFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.giri-modal-dialog {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 16px;
  width: 90%;
  max-width: 740px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
  animation: giriScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes giriScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.giri-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
}
.giri-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.giri-modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.giri-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.giri-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Tabbed Settings */
.giri-settings-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
  overflow-x: auto;
}
.giri-settings-tab-btn {
  padding: 9px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.giri-settings-tab-btn:hover {
  color: #0f172a;
}
.giri-settings-tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* Settings Form Controls */
.giri-setting-group {
  margin-bottom: 20px;
}
.giri-setting-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  display: block;
  margin-bottom: 6px;
}
.giri-setting-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px 0;
  line-height: 1.45;
}
.giri-select, .giri-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  background: #ffffff;
}
.giri-select:focus, .giri-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Google Drive Sovereign Modal Styles */
.giri-account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 18px;
}
.giri-account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.giri-badge-sovereign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #bbf7d0;
}
.giri-quota-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0 6px 0;
}
.giri-quota-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 4px;
}

/* Download Suite Cards */
.giri-dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.giri-dl-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.giri-dl-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}
.giri-dl-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.giri-dl-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.giri-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.15s ease;
}
.giri-dl-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}
.giri-dl-btn.secondary {
  background: #f1f5f9;
  color: #0f172a;
}
.giri-dl-btn.secondary:hover {
  background: #e2e8f0;
}

/* ============================================================================
 * 9. MODAL EXPANSIONS: Template Studio, All Apps, My Content & User Profile
 * ============================================================================
 */
.giri-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.giri-filter-pill-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.6);
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.giri-filter-pill-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}
.giri-filter-pill-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.giri-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.giri-template-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.giri-template-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.12);
}
.giri-template-thumb {
  height: 94px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  font-weight: 700;
  font-size: 26px;
}

.giri-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.giri-app-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}
.giri-app-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.1);
}
.giri-app-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
}

.giri-content-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.giri-content-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.giri-content-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
}
.giri-content-table tr:hover td {
  background: #f8fafc;
}


/* ==========================================================================
   IMPROVED LOGOS & HIGH-FIDELITY PREVIEWS: FORMS, QUIZ, LISTS, DESIGNER
   ========================================================================== */

/* 4. Form Preview (Teal & Emerald) */
.preview-form {
  background: #f0fdfa !important;
}
.sheet-form {
  width: 60px !important;
  height: 74px !important;
  background: #ffffff !important;
  border: 1px solid #ccfbf1 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}
.form-top-clip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 5px;
  background: #cbd5e1;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  z-index: 2;
}
.form-header-bar {
  height: 12px;
  background: #0d9488;
  width: 100%;
}
.form-body {
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-chk-checked {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #10b981;
  color: #ffffff;
  font-size: 7px;
  line-height: 8px;
  text-align: center;
  font-weight: 900;
  display: inline-block;
}
.form-chk-empty {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid #94a3b8;
  background: #f8fafc;
  display: inline-block;
}
.form-line {
  flex: 1;
  height: 4px;
  background: #334155;
  border-radius: 2px;
}
.form-line.muted {
  background: #94a3b8;
}
.form-line.short {
  flex: 0 0 65%;
}
.form-stars {
  display: flex;
  gap: 2px;
  color: #f59e0b;
  font-size: 7px;
  line-height: 1;
  margin-top: 2px;
}

/* 5. Quiz Preview (Electric Azure) */
.preview-quiz {
  background: #f0f9ff !important;
}
.sheet-quiz {
  width: 60px !important;
  height: 74px !important;
  background: #ffffff !important;
  border: 1px solid #bae6fd !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}
.quiz-medal-seal {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 10px;
  height: 10px;
  background: #f59e0b;
  border-radius: 50%;
  color: #ffffff;
  font-size: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.quiz-header-bar {
  height: 12px;
  background: #0284c7;
  width: 100%;
}
.quiz-body {
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quiz-stem {
  width: 90%;
  height: 4px;
  background: #0f172a;
  border-radius: 2px;
  margin-bottom: 2px;
}
.quiz-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.quiz-radio-selected {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-radio-selected::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0284c7;
}
.quiz-radio-empty {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #94a3b8;
  background: #ffffff;
}
.quiz-score-pill {
  margin-top: 3px;
  align-self: flex-start;
  font-size: 7px;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  padding: 1px 4px;
  border-radius: 4px;
}

/* 6. List Preview (Agile Kanban Purple) */
.preview-list {
  background: #faf5ff !important;
}
.sheet-list {
  width: 68px !important;
  height: 74px !important;
  background: #ffffff !important;
  border: 1px solid #e9d5ff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.list-header-bar {
  height: 11px;
  background: #7c3aed;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 2px;
}
.list-header-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ddd6fe;
}
.list-body {
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.list-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px;
  border-radius: 3px;
  background: #f8fafc;
  border: 0.5px solid #e2e8f0;
}
.list-task-item.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.list-task-left {
  display: flex;
  align-items: center;
  gap: 3px;
}
.list-task-ck {
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: #16a34a;
  color: #ffffff;
  font-size: 5px;
  line-height: 6px;
  text-align: center;
  font-weight: 900;
}
.list-task-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
}
.list-task-bullet.purple {
  background: #7c3aed;
}
.list-task-text {
  width: 24px;
  height: 3px;
  background: #334155;
  border-radius: 1px;
}
.list-tag-pill {
  font-size: 6px;
  font-weight: 800;
  padding: 0 3px;
  border-radius: 2px;
  line-height: 8px;
}
.list-tag-pill.done {
  color: #15803d;
  background: #dcfce7;
}
.list-tag-pill.active {
  color: #b45309;
  background: #fef3c7;
}
.list-tag-pill.queue {
  color: #6b21a8;
  background: #f3e8ff;
}

/* Heuristic #12: Design Preview - Flat Monochromatic Badged Aesthetic */
.preview-designer {
  background: #fdf2f8 !important;
}
.sheet-designer {
  width: 58px !important;
  height: 74px !important;
  background: #ffffff !important;
  border: 1px solid #fbcfe8 !important;
  border-radius: 3px !important;
  box-shadow: 0 2px 6px rgba(219, 39, 119, 0.08) !important;
  padding: 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}
.designer-top-bar {
  height: 5px;
  background: #fbcfe8;
  border-radius: 2px;
  width: 60%;
}
.designer-canvas-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #fff5f8;
  border-radius: 3px;
  border: 1px dashed #f472b6;
  padding: 4px;
}
.designer-shape-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ec4899;
}
.designer-shape-rect {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #f472b6;
}


/* Modern Modal Dark Helpers */
.giri-modal-header h2 {
  color: #f8fafc !important;
}
.giri-modal-close-btn {
  color: #94a3b8 !important;
}
.giri-modal-close-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.1) !important;
}
.giri-template-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #38bdf8 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 18px rgba(56, 189, 248, 0.3) !important;
}
.giri-template-title {
  color: #f8fafc !important;
  font-weight: 700;
}
.giri-template-desc {
  color: #94a3b8 !important;
}
.giri-app-grid-card {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  color: #f8fafc !important;
}
.giri-app-grid-card:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.25) !important;
  transform: translateY(-3px) !important;
}


/* ============================================================================
 * LUXURY LIVING AURORA BACKGROUND & ULTRA-MODERN HUB ANIMATIONS
 * ============================================================================
 */

.m365-hub-root {
  position: relative;
  overflow: hidden;
}

.m365-hub-root::after {
  content: '';
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle at 18% 22%, rgba(37, 99, 235, 0.32) 0%, transparent 42%),
              radial-gradient(circle at 82% 20%, rgba(124, 58, 237, 0.28) 0%, transparent 45%),
              radial-gradient(circle at 48% 80%, rgba(13, 148, 136, 0.24) 0%, transparent 48%),
              radial-gradient(circle at 76% 65%, rgba(219, 39, 119, 0.22) 0%, transparent 44%);
  filter: blur(65px);
  pointer-events: none;
  z-index: 1;
  animation: auroraMeshPulse 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes auroraMeshPulse {
  0% {
    transform: scale(1) translate(0, 0) rotate(0deg);
  }
  50% {
    transform: scale(1.08) translate(-2%, 2%) rotate(2deg);
  }
  100% {
    transform: scale(0.95) translate(2%, -1.5%) rotate(-2deg);
  }
}

.m365-left-rail,
.m365-canvas {
  position: relative;
  z-index: 5;
}

/* Hero Title Gradient Shimmer */
.m365-hero-title {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 30%, #93c5fd 65%, #c084fc 100%) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: heroShine 8s ease infinite !important;
}

@keyframes heroShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Staggered Card Entrance */
@keyframes m365CardEntrance {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.m365-create-card {
  animation: m365CardEntrance 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  position: relative;
  overflow: hidden;
}

.m365-create-card:nth-child(1) { animation-delay: 0.03s; }
.m365-create-card:nth-child(2) { animation-delay: 0.06s; }
.m365-create-card:nth-child(3) { animation-delay: 0.09s; }
.m365-create-card:nth-child(4) { animation-delay: 0.12s; }
.m365-create-card:nth-child(5) { animation-delay: 0.15s; }
.m365-create-card:nth-child(6) { animation-delay: 0.18s; }
.m365-create-card:nth-child(7) { animation-delay: 0.21s; }

/* Light Shimmer Sweep across Card on Hover */
.m365-create-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 90%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-22deg);
  transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 10;
}

.m365-create-card:hover::before {
  left: 200%;
}

/* Sheet Float Inside Card on Hover */
.m365-create-card:hover .sheet-word,
.m365-create-card:hover .sheet-ppt,
.m365-create-card:hover .sheet-excel,
.m365-create-card:hover .sheet-form,
.m365-create-card:hover .sheet-quiz,
.m365-create-card:hover .sheet-list,
.m365-create-card:hover .sheet-designer {
  transform: translateY(-4px) scale(1.035);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.sheet-word,
.sheet-ppt,
.sheet-excel,
.sheet-form,
.sheet-quiz,
.sheet-list,
.sheet-designer {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

/* Badge Corner Pop Animation */
.m365-create-card:hover .badge-corner {
  transform: scale(1.22) rotate(-5deg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.badge-corner {
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.24s ease;
}

/* Search Container Focus Animation */
.m365-search-container {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.m365-search-container:focus-within {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.85) !important;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.3), 0 0 0 2px rgba(56, 189, 248, 0.4) !important;
}

/* Rail Button Smooth Micro-Transitions */
.m365-rail-btn {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.m365-rail-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.06);
}

.m365-rail-btn:active {
  transform: scale(0.96);
}

.m365-rail-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  background: #38bdf8;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #38bdf8;
}

/* See More in Create Link Glow */
.m365-see-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #38bdf8 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.m365-see-more:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  transform: translateX(4px) scale(1.02) !important;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3) !important;
}

/* Quick Access Row Hover Lift */
.m365-table-row {
  transition: all 0.22s ease;
}

.m365-table-row:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  transform: translateX(4px);
}


/* ============================================================================
 * TOP UTILITY HEADER & ACCOUNT / CLOUD LOGIN PILL (Top-Right Circled Area)
 * ============================================================================ */
.m365-top-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 4px 10px 4px;
  margin-bottom: 0 !important;
  position: relative;
  z-index: 10;
}

.m365-top-header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.m365-suite-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
}

.m365-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.m365-top-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.m365-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 6px 14px;
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1), background 0.14s, border-color 0.14s, box-shadow 0.14s !important;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  transform: translateZ(0);
  will-change: transform;
}

.m365-header-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(56, 189, 248, 0.25);
};
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.m365-header-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.25);
}

.m365-cloud-status-pill {
  border-color: rgba(16, 185, 129, 0.3);
}

.m365-cloud-status-pill:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.m365-cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.m365-cloud-dot.connected {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

.m365-account-pill {
  padding: 4px 14px 4px 6px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.25));
  border: 1px solid rgba(124, 58, 237, 0.45);
}

.m365-account-pill:hover {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
}

.m365-account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
  flex-shrink: 0;
}

.m365-account-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.15;
}

.m365-account-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.m365-account-badge {
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.2px;
}


/* ============================================================================
 * GIRI ORBIT — ANDROID & MOBILE PHONE ULTRA-SMOOTH OPTIMIZATIONS
 * Supports Android (Pixel, Samsung, OnePlus, Xiaomi) & iOS devices
 * Touch-action manipulation, 0ms tap delay, native bottom navigation rail,
 * responsive swipeable carousels, and safe-area insets
 * ============================================================================ */

@media (max-width: 768px) {
  /* Prevent horizontal overflow and enable smooth inertia scrolling */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    overscroll-behavior-y: contain !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* Hardware accelerated smooth touch interactions */
  button, [role="button"], a, input, select, .m365-create-card, .m365-pill, .m365-rail-btn {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* Full-viewport mobile root */
  .m365-hub-root {
    flex-direction: column !important;
    height: 100% !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    position: relative !important;
  }

  /* --------------------------------------------------------------------------
     1. LEFT RAIL TRANSFORMS INTO NATIVE MOBILE BOTTOM NAVIGATION BAR
     -------------------------------------------------------------------------- */
  .m365-left-rail {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    min-width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 4px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    border-right: none !important;
    border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
    background: rgba(13, 19, 33, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    z-index: 9999 !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box !important;
  }

  .m365-left-rail .m365-rail-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    width: 100% !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide excessive desktop icons in mobile bottom bar */
  .m365-left-rail .m365-rail-tools,
  .m365-left-rail .m365-rail-divider,
  #rail-btn-girionix,
  #rail-btn-content,
  #rail-btn-converter,
  #rail-btn-storage,
  #rail-btn-settings,
  #rail-btn-download {
    display: none !important;
  }

  .m365-left-rail .m365-rail-bottom {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Mobile bottom bar touch items (48px height) */
  .m365-left-rail .m365-rail-btn {
    width: auto !important;
    min-width: 52px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px !important;
  }

  .m365-left-rail .m365-rail-icon-wrap {
    width: 22px !important;
    height: 22px !important;
  }

  .m365-left-rail .m365-rail-icon-wrap svg {
    width: 18px !important;
    height: 18px !important;
  }

  .m365-left-rail .m365-rail-label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    line-height: 1 !important;
    margin-top: 1px !important;
  }

  .m365-left-rail .m365-rail-btn.active .m365-rail-label {
    color: #38bdf8 !important;
  }

  .m365-left-rail .m365-rail-btn.active::before {
    display: none !important;
  }

  .m365-left-rail .m365-rail-btn.active {
    background: rgba(56, 189, 248, 0.12) !important;
  }

  /* --------------------------------------------------------------------------
     2. MAIN WORKSPACE CANVAS ON MOBILE
     -------------------------------------------------------------------------- */
  .m365-canvas {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 14px 76px 14px !important; /* 76px bottom clearance so bottom bar never obstructs */
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .m365-inner-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    gap: 16px !important;
  }

  /* --------------------------------------------------------------------------
     3. TOP HEADER BAR ON MOBILE
     -------------------------------------------------------------------------- */
  .m365-top-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    padding: 0 2px !important;
  }

  .m365-suite-indicator {
    padding: 3px 8px !important;
    font-size: 11px !important;
  }

  .m365-top-header-right {
    gap: 6px !important;
  }

  .m365-cloud-status-pill {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .m365-account-pill {
    padding: 3px 8px 3px 4px !important;
  }

  .m365-account-badge {
    display: none !important;
  }

  .m365-account-name {
    font-size: 11.5px !important;
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* --------------------------------------------------------------------------
     4. HERO SECTION ON MOBILE
     -------------------------------------------------------------------------- */
  .m365-hero {
    gap: 10px !important;
    padding: 4px 0 8px 0 !important;
  }

  .m365-hero-title {
    font-size: 22px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .m365-hero-subtitle-bar {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    text-align: center !important;
  }

  .m365-hero-subtitle-bar .m365-badge {
    padding: 3px 8px !important;
  }

  .m365-hero-download-btn {
    padding: 5px 12px !important;
    font-size: 11.5px !important;
  }

  .giri-social-handles-bar {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
  }

  .giri-social-pill {
    padding: 3px 8px !important;
    font-size: 10.5px !important;
    min-height: 30px !important;
  }

  /* --------------------------------------------------------------------------
     5. UNIVERSAL SEARCH BAR ON MOBILE
     -------------------------------------------------------------------------- */
  .m365-search-bar {
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
  }

  .search-kbd-hint {
    display: none !important;
  }

  #m365-search-box {
    font-size: 13px !important;
    padding: 0 34px 0 36px !important;
  }

  #m365-search-dropdown {
    width: 100% !important;
    max-height: 60vh !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* --------------------------------------------------------------------------
     6. CREATE NEW SECTION: HORIZONTAL SWIPEABLE CAROUSEL ON MOBILE
     -------------------------------------------------------------------------- */
  .m365-cards-row {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 10px !important;
    padding-bottom: 8px !important;
    scrollbar-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .m365-cards-row::-webkit-scrollbar {
    display: none !important;
  }

  .m365-create-card {
    flex: 0 0 120px !important;
    min-width: 120px !important;
    scroll-snap-align: start !important;
    padding: 10px 8px !important;
  }

  .m365-card-preview {
    height: 76px !important;
  }

  .m365-card-title {
    font-size: 12px !important;
  }

  .m365-card-sub {
    font-size: 10px !important;
  }

  /* --------------------------------------------------------------------------
     7. QUICK ACCESS & RECENT DOCUMENTS ON MOBILE
     -------------------------------------------------------------------------- */
  .m365-quick-access-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .m365-pills-row {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    scrollbar-width: none !important;
    width: 100% !important;
  }

  .m365-pills-row::-webkit-scrollbar {
    display: none !important;
  }

  .m365-pill {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .m365-actions-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .m365-upload-btn, .m365-pill-outline {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    min-height: 38px !important;
    white-space: nowrap !important;
  }

  /* Responsive Table Container */
  .m365-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    border-radius: 10px !important;
  }

  .m365-table {
    min-width: 440px !important;
  }

  .m365-table th, .m365-table td {
    padding: 10px 8px !important;
    font-size: 12px !important;
  }

  /* --------------------------------------------------------------------------
     8. MODALS & DIALOGS ON MOBILE
     -------------------------------------------------------------------------- */
  .giri-modal-dialog {
    width: 95% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    margin: auto !important;
    border-radius: 16px !important;
  }

  .giri-modal-body {
    padding: 14px 14px !important;
  }

  .giri-modal-header {
    padding: 12px 14px !important;
  }

  /* --------------------------------------------------------------------------
     9. TOOL HUBS & APP WORKSPACES ON MOBILE
     -------------------------------------------------------------------------- */
  .drift-hub-top-bar, .axis-hub-top-bar, .kinetic-hub-top-bar, .pdf-hub-top-bar {
    padding: 0 10px !important;
    height: 48px !important;
  }

  .tool-hub-suite-links {
    display: none !important;
  }

  .drift-hub-nav-links {
    gap: 10px !important;
    font-size: 11.5px !important;
  }

  .drift-hub-hero, .axis-hub-hero, .kinetic-hub-hero {
    padding: 16px 12px !important;
  }

  .drift-templates-carousel, .axis-templates-carousel, .kinetic-templates-carousel {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 10px !important;
    scrollbar-width: none !important;
  }
}

/* Extra small Android phone screens (<= 480px) */
@media (max-width: 768px) {
  .m365-top-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 4px 2px !important;
  }

  .m365-top-header-right {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 2px 0 6px 0 !important;
  }

  .m365-top-header-right::-webkit-scrollbar {
    display: none !important;
  }

  .m365-header-pill {
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    padding: 5px 10px !important;
  }
}


/* ============================================================================
 * PINNED TOP-RIGHT CORNER ACCOUNT & MULTI-CLOUD STATUS HUB
 * (Visible at top-right corner of viewport in landing workspace)
 * ============================================================================ */
.m365-corner-account-hub {
  display: none !important; /* Unified into in-flow .m365-top-header-right to eliminate collision */
}

.m365-corner-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 6px 14px;
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}

.m365-corner-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.25);
}

.m365-corner-drive-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.m365-corner-drive-btn:hover {
  border-color: #3b82f6;
  color: #38bdf8;
}

.m365-corner-account-btn {
  padding: 4px 12px 4px 6px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.35);
}

.m365-corner-account-btn:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35), 0 0 16px rgba(56, 189, 248, 0.3);
}

/* Sign In to Connect Cloud States */
.m365-account-pill.not-logged-in,
.m365-corner-account-btn.not-logged-in {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(124, 58, 237, 0.28)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25) !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.m365-account-pill.not-logged-in:hover,
.m365-corner-account-btn.not-logged-in:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(124, 58, 237, 0.42)) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-1px);
}

.m365-account-pill.not-logged-in .m365-account-avatar,
.m365-corner-account-btn.not-logged-in .m365-account-avatar {
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5) !important;
}

.m365-account-pill.not-logged-in .m365-account-name,
.m365-corner-account-btn.not-logged-in .m365-account-name {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
}

.m365-account-pill.not-logged-in .m365-account-badge,
.m365-corner-account-btn.not-logged-in .m365-account-badge {
  color: #38bdf8 !important;
  font-weight: 600 !important;
  font-size: 10.5px !important;
}

.m365-account-pill.logged-in .m365-account-avatar,
.m365-corner-account-btn.logged-in .m365-account-avatar {
  background: #16a34a !important;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.5) !important;
}

/* Ensure Search Bar has 50px comfortable vertical height and no cramping */
.m365-search-bar {
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 20px !important;
  border-radius: 14px !important;
}

#m365-search-box {
  font-size: 14.5px !important;
  min-height: 46px !important;
}

/* Ensure Upload Button is High Contrast Primary Vibrant Blue and NEVER White-on-White */
#btn-m365-upload-file,
.m365-upload-btn {
  background: #2563eb !important;
  background-color: #2563eb !important;
  border: 1.5px solid #3b82f6 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}

#btn-m365-upload-file svg,
.m365-upload-btn svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
  fill: none !important;
}

#btn-m365-upload-file span,
.m365-upload-btn span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#btn-m365-upload-file:hover,
.m365-upload-btn:hover {
  background: #1d4ed8 !important;
  background-color: #1d4ed8 !important;
  border-color: #60a5fa !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.65) !important;
  transform: translateY(-1px) !important;
}

.m365-view-toggle {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}


/* ============================================================================
 * CLOUDLESS P2P WORKPLACE COLLABORATION DOCK & PRESENCE STYLES
 * ============================================================================ */
.orbit-p2p-presence-dock {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.p2p-dock-card {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.p2p-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.p2p-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p2p-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.p2p-pulse-dot.idle {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.p2p-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.p2p-role-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.4px;
}

.p2p-role-pill.role-editor {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.4);
}

.p2p-role-pill.role-auditor {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.p2p-role-pill.role-viewer {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.p2p-dock-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.p2p-btn-sm {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 8px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.p2p-btn-sm:hover {
  background: #2563eb;
  border-color: #38bdf8;
  color: #ffffff;
}

.p2p-host-status {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.p2p-avatars-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.p2p-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  border: 1.5px solid #0f172a;
  position: relative;
}

.p2p-sub-role {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 8px;
  line-height: 1;
}

.p2p-peer-count {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 4px;
}

/* ============================================================================
 * GLOBAL RTL (ARABIC) SUPPORT
 * ============================================================================ */
.giri-rtl-layout {
  direction: rtl !important;
  text-align: right !important;
}

.giri-rtl-layout .m365-left-rail {
  left: auto !important;
  right: 0 !important;
  border-right: none !important;
  border-left: 1px solid var(--m365-border) !important;
}

.giri-rtl-layout .m365-corner-account-hub {
  right: auto !important;
  left: 28px !important;
}

/* ==========================================================================
   UNIVERSAL TOOL SWITCHER & REQUIREMENT SATISFIER
   ========================================================================== */
.suite-tool-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.26));
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.suite-tool-switcher-btn:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(124, 58, 237, 0.42));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.tool-requirement-card:hover {
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2) !important;
  transform: translateY(-2px);
}

.tool-requirement-card:hover .btn-switch-launch-tool {
  filter: brightness(1.12);
  transform: scale(1.02);
}

.switcher-cat-chip.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

#tool-switcher-search-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3) !important;
}

/* ==========================================================================
   150 FPS+ ULTRA-FLUID GPU HARDWARE ACCELERATION & HIGH REFRESH RATE ENGINE
   ========================================================================== */
*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body, .orbit-workspace, .m365-canvas, .m365-inner-wrapper {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Force hardware composite layer promotion for buttery 150+ FPS rendering */
.m365-tool-card,
.m365-header-pill,
.suite-tool-card,
.m365-rail-item,
.m365-create-card,
.m365-search-box,
.m365-recent-row,
.suite-tool-switcher-modal,
.p2p-modal-content,
.m365-account-pill {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform, opacity;
}

/* Content visibility containment for zero scroll lag and instant frame throughput */
.m365-templates-grid,
.m365-recent-grid,
.suite-tools-grid {
  content-visibility: auto;
  contain-intrinsic-size: 380px;
}

/* Zero-jank high-refresh-rate transitions */
.m365-tool-card,
.m365-header-pill,
.suite-tool-card,
.m365-rail-item {
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.14s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.14s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.14s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
