/* ==========================================================================
   KP Files - Google Drive & Google Workspace Theme
   Pure Google Drive Aesthetic | Designed for KP Files PaaS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* --- Material 3 & Google Drive Palette Variables --- */
:root {
  --blue: #1a73e8;
  --dark-blue: #1557b0;
  --red: #d93025;
  --dark-red: #b31412;
  --green: #1e8e3e;
  --yellow: #f9ab00;

  --icon-blue: #1a73e8;
  --icon-green: #34a853;
  --icon-yellow: #fbbc04;
  --icon-red: #ea4335;

  --background: #f8fafd;
  --surfacePrimary: #ffffff;
  --surfaceSecondary: #edf2fc;
  --surfaceVariant: #e1e3e1;

  --item-selected: #c2e7ff;
  --item-selected-border: #7fcfff;
  --item-selected-text: #001d35;

  --action: #444746;
  --action-hover: #1f1f1f;

  --textPrimary: #1f1f1f;
  --textSecondary: #444746;
  --textTertiary: #5f6368;

  --borderPrimary: #dadce0;
  --borderSecondary: #e0e2e5;
  --divider: #e0e2e5;
  --hover: rgba(0, 0, 0, 0.04);
  
  --font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Global Typography & Smooth Reset --- */
body, html, input, button, select, textarea {
  font-family: var(--font-family) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--background) !important;
  color: var(--textPrimary) !important;
}

/* ==========================================================================
   LOGIN & AUTHENTICATION (AUTHENTIC GOOGLE WORKSPACE / GOOGLE ACCOUNT CARD)
   ========================================================================== */
#login {
  background-color: #f0f4f9 !important;
  background-image: 
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.82) 0%, rgba(240, 244, 249, 0.6) 100%),
    radial-gradient(rgba(26, 115, 232, 0.45) 2px, transparent 2px),
    radial-gradient(rgba(52, 168, 83, 0.35) 1.8px, transparent 1.8px),
    linear-gradient(to right, rgba(26, 115, 232, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 115, 232, 0.09) 1px, transparent 1px) !important;
  background-size: 100% 100%, 36px 36px, 72px 72px, 72px 72px, 72px 72px !important;
  background-position: 0 0, 0 0, 18px 18px, 0 0, 0 0 !important;
  animation: techGridDrift 30s linear infinite !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 9999 !important;
}

@keyframes techGridDrift {
  0% {
    background-position: 0 0, 0 0, 18px 18px, 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 72px 72px, 90px 90px, 72px 72px, 72px 72px;
  }
}

/* Interactive Floating Lines & Dots Canvas */
.login-background-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Ambient Google Color Orbs */
#login::before {
  content: "";
  position: absolute;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(66, 133, 244, 0.10) 0%, rgba(255, 255, 255, 0) 70%);
  top: -160px;
  left: -160px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

#login::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(52, 168, 83, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -160px;
  right: -160px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

/* Google Sign-in Elevated Card - Perfectly Centered */
#login form {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: auto !important;
  width: 100% !important;
  max-width: 440px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(218, 220, 224, 0.9) !important;
  border-radius: 28px !important;
  padding: 44px 40px 36px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
              0 12px 28px -4px rgba(0, 0, 0, 0.07),
              0 24px 38px -6px rgba(0, 0, 0, 0.03) !important;
  text-align: center !important;
  box-sizing: border-box !important;
  z-index: 2 !important;
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Iconic Google Drive Logo Animation & Size */
#login img {
  width: 72px !important;
  height: 64px !important;
  margin: 0 auto 16px !important;
  display: block !important;
  filter: drop-shadow(0 3px 8px rgba(38, 132, 252, 0.22)) !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#login img:hover {
  transform: scale(1.08) rotate(2deg) !important;
}

/* KP Files Title */
#login h1 {
  font-family: 'Google Sans', 'Product Sans', Roboto, -apple-system, sans-serif !important;
  font-size: 26px !important;
  font-weight: 500 !important;
  color: #1f1f1f !important;
  margin: 0 0 6px 0 !important;
  letter-spacing: -0.4px !important;
}

/* Subtitle placed directly under KP Files */
#login h1::after {
  content: "Sign in to continue to KP Files";
  display: block !important;
  font-family: 'Google Sans', Roboto, sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #5f6368 !important;
  margin-top: 6px !important;
  margin-bottom: 24px !important;
  letter-spacing: normal !important;
}

/* Remove inverted top form::before */
#login form::before {
  content: none !important;
  display: none !important;
}

/* Google Outlined Text Inputs */
#login input.input {
  border: 1.5px solid #dadce0 !important;
  border-radius: 12px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-family: 'Google Sans', Roboto, sans-serif !important;
  color: #1f1f1f !important;
  background: #f8fafd !important;
  height: 52px !important;
  margin-bottom: 16px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

#login input.input:hover {
  background: #ffffff !important;
  border-color: #bec0c4 !important;
}

#login input.input:focus {
  background: #ffffff !important;
  border-color: #1a73e8 !important;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.16) !important;
  outline: none !important;
}

#login input.input::placeholder {
  color: #747775 !important;
  font-size: 14.5px !important;
}

/* Primary Google Blue Pill Submit Button */
#login input[type="submit"],
#login .button {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
  border: none !important;
  border-radius: 26px !important;
  height: 48px !important;
  color: #ffffff !important;
  font-family: 'Google Sans', Roboto, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.25px !important;
  padding: 0 28px !important;
  width: 100% !important;
  margin-top: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#login input[type="submit"]:hover,
#login .button:hover {
  background: linear-gradient(135deg, #1765cc 0%, #0d47a1 100%) !important;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.45) !important;
  transform: translateY(-1px) !important;
}

#login input[type="submit"]:active,
#login .button:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3) !important;
}

/* Clean Google Card Footer */
#login form::after {
  content: "KP Files • Google Drive Cloud Storage & Backups";
  display: block !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #747775 !important;
  margin-top: 26px !important;
  letter-spacing: 0.2px !important;
  border-top: 1px solid #f1f3f4 !important;
  padding-top: 16px !important;
  font-family: 'Google Sans', Roboto, sans-serif !important;
}

/* ==========================================================================
   TOP NAVIGATION HEADER (GOOGLE DRIVE)
   ========================================================================== */
header {
  background: var(--surfacePrimary) !important;
  border-bottom: 1px solid var(--borderSecondary) !important;
  box-shadow: none !important;
  height: 64px !important;
  padding: 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  z-index: 1000 !important;
  overflow: visible !important;
}

header img {
  height: 36px !important;
  width: 40px !important;
  object-fit: contain !important;
  margin-right: 10px !important;
  filter: drop-shadow(0 1px 3px rgba(38, 132, 252, 0.3));
}

header .action {
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  color: var(--textSecondary) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
  margin: 0 2px !important;
}

header .action:hover {
  background-color: #f1f3f4 !important;
  color: var(--textPrimary) !important;
}

header .action i {
  font-size: 22px !important;
}

/* Google Drive Header Brand Text */
header::before {
  content: "KP Files";
  font-family: 'Google Sans', 'Product Sans', Roboto, sans-serif !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  color: #444746 !important;
  margin-right: 20px !important;
  letter-spacing: -0.2px !important;
  display: inline-block !important;
}

/* ==========================================================================
   FLOATING PILL SEARCH BAR & POPUP (GOOGLE DRIVE)
   ========================================================================== */
#search {
  max-width: 680px !important;
  height: 46px !important;
  flex: 1 1 auto !important;
  margin: 0 20px !important;
  position: relative !important;
  z-index: 1000 !important;
  overflow: visible !important;
}

#search.active {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 680px !important;
  height: 46px !important;
  z-index: 10000 !important;
  background: transparent !important;
}

#search #input {
  background: #edf2fc !important;
  border-radius: 24px !important;
  height: 46px !important;
  padding: 0 16px !important;
  border: 1px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 2 !important;
}

#search #input:focus-within,
#search.active #input {
  background: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15) !important;
  border-radius: 24px !important;
  height: 46px !important;
}

#search #input .action,
#search #input i {
  color: var(--textSecondary) !important;
  font-size: 20px !important;
  margin-right: 12px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

#search #input input {
  font-family: var(--font-family) !important;
  font-size: 14.5px !important;
  color: var(--textPrimary) !important;
  border: none !important;
  background: transparent !important;
  width: 100% !important;
  outline: none !important;
  height: 100% !important;
}

#search #input input::placeholder {
  color: var(--textTertiary) !important;
  font-size: 14px !important;
}

/* Floating Search Results Dropdown */
#search #result {
  display: none !important;
}

#search.active #result {
  display: block !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 48px !important;
  max-height: 520px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 16px 2px rgba(60,64,67,0.22), 0 1px 3px 0 rgba(60,64,67,0.15) !important;
  border: 1px solid #dadce0 !important;
  padding: 16px 20px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 10001 !important;
  box-sizing: border-box !important;
}

#search #result > div {
  max-width: 100% !important;
  margin: 0 !important;
}

#search #result p {
  font-size: 13.5px !important;
  color: var(--textSecondary) !important;
  margin: 4px 0 12px 0 !important;
  line-height: 1.4 !important;
}

/* Search Category Filter Boxes */
#search .boxes {
  border: 1px solid #e0e2e5 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  background: #f8fafd !important;
  padding: 14px !important;
  margin: 10px 0 !important;
}

#search .boxes h3 {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #5f6368 !important;
  margin: 0 0 10px 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

#search .boxes > div {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  margin: 0 !important;
}

#search .boxes > div > div {
  background: #ffffff !important;
  border: 1px solid #dadce0 !important;
  color: #202124 !important;
  border-radius: 10px !important;
  padding: 12px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: auto !important;
  margin: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(60,64,67,0.06) !important;
  transition: all 0.15s ease !important;
}

#search .boxes > div > div:hover {
  background: #e8f0fe !important;
  border-color: #1a73e8 !important;
  color: #1a73e8 !important;
}

#search .boxes i {
  color: #1a73e8 !important;
  font-size: 24px !important;
}

#search .boxes p {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: inherit !important;
  margin: 0 !important;
}

/* Results List */
#search ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#search ul li {
  margin: 0 0 4px 0 !important;
}

#search ul li a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  color: #202124 !important;
  text-decoration: none !important;
  font-size: 13.5px !important;
  transition: background-color 0.15s !important;
}

#search ul li a:hover {
  background: #f1f3f4 !important;
  color: #1a73e8 !important;
}

#search ul li a i {
  color: #5f6368 !important;
  font-size: 20px !important;
}

#search ul li a:hover i {
  color: #1a73e8 !important;
}

/* ==========================================================================
   LEFT NAVIGATION DRAWER (GOOGLE DRIVE)
   ========================================================================== */
nav {
  background: var(--background) !important;
  border-right: 1px solid var(--borderSecondary) !important;
  width: 256px !important;
  padding: 16px 8px 16px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 64px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.sidebar-top-nav {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
}

.sidebar-bottom-section {
  margin-top: auto !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--borderSecondary) !important;
  flex-shrink: 0 !important;
}

/* User Card in Bottom Left Corner */
.sidebar-user-card {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 8px 12px !important;
  border-radius: 16px !important;
  border: 1px solid var(--borderSecondary) !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(60,64,67,0.08) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin-bottom: 6px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.sidebar-user-card:hover {
  background: #f8fafd !important;
  border-color: var(--blue) !important;
  box-shadow: 0 2px 6px rgba(26,115,232,0.15) !important;
}

/* Vibrant Avatar Circle with User Initial */
.sidebar-avatar-circle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
  color: #ffffff !important;
  font-family: 'Google Sans', Roboto, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 12px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 4px rgba(26,115,232,0.25) !important;
}

.sidebar-user-meta {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  line-height: 1.25 !important;
}

.sidebar-user-name {
  font-family: 'Google Sans', Roboto, sans-serif !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  color: var(--textPrimary) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sidebar-user-role {
  font-size: 11.5px !important;
  color: var(--textTertiary) !important;
  font-weight: 400 !important;
  margin-top: 2px !important;
}

/* Bottom Logout Action */
.sidebar-logout-action {
  border-radius: 20px !important;
  height: 38px !important;
  color: var(--textSecondary) !important;
  transition: all 0.15s ease !important;
  margin: 2px 0 6px 0 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 16px !important;
  font-weight: 500 !important;
}

.sidebar-logout-action:hover {
  background: #fce8e6 !important;
  color: #d93025 !important;
}

.sidebar-logout-action:hover i {
  color: #d93025 !important;
}

/* ==========================================================================
   CSS FLEXBOX RE-ORDERING (FOR RUNTIME BACKWARDS COMPATIBILITY)
   ========================================================================== */
nav > button:first-of-type {
  order: 95 !important;
  margin-top: 6px !important;
  background: #ffffff !important;
  border: 1px solid var(--borderSecondary) !important;
  border-radius: 16px !important;
  height: 46px !important;
  padding: 6px 12px !important;
  box-shadow: 0 1px 3px rgba(60,64,67,0.08) !important;
}

nav > button:first-of-type i {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 10px !important;
  font-size: 18px !important;
  box-shadow: 0 2px 4px rgba(26,115,232,0.25) !important;
}

nav > button:first-of-type span {
  font-weight: 600 !important;
  font-size: 13.5px !important;
  color: var(--textPrimary) !important;
}

nav > button:first-of-type:hover {
  border-color: var(--blue) !important;
  background: #f8fafd !important;
}

nav #logout {
  order: 98 !important;
  margin-top: 4px !important;
  border-radius: 20px !important;
}

nav #logout:hover {
  background: #fce8e6 !important;
  color: #d93025 !important;
}

nav #logout:hover i {
  color: #d93025 !important;
}

nav .credits:not(p) {
  order: 90 !important;
  margin-top: auto !important;
  margin-bottom: 12px !important;
  width: 100% !important;
  padding: 0 8px !important;
}

nav p.credits {
  order: 99 !important;
  margin-top: 6px !important;
}

nav .action {
  border-radius: 24px !important;
  height: 42px !important;
  margin: 3px 0 !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: var(--textSecondary) !important;
  width: 100% !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

nav .action:hover {
  background-color: #e8eaed !important;
  color: var(--textPrimary) !important;
}

nav .action.router-link-active,
nav .action:focus {
  background-color: var(--item-selected) !important;
  color: var(--item-selected-text) !important;
  font-weight: 500 !important;
}

nav .action i {
  font-size: 20px !important;
  margin-right: 14px !important;
  color: inherit !important;
}

/* Google Drive "+ New" Buttons */
nav button[title*="Folder"],
nav button[title*="File"] {
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 1px 2px 0 rgba(60,64,67,.15) !important;
  height: 46px !important;
  padding: 0 18px !important;
  margin: 6px 0 !important;
  color: var(--textPrimary) !important;
  border: 1px solid var(--borderSecondary) !important;
}

nav button[title*="Folder"]:hover,
nav button[title*="File"]:hover {
  background: #f8fafd !important;
  box-shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15) !important;
}

/* Google Drive Storage Indicator */
.credits {
  font-size: 12px !important;
  color: var(--textTertiary) !important;
  padding: 0 12px !important;
}

.credits .bar {
  background: #e0e2e5 !important;
  border-radius: 4px !important;
  height: 5px !important;
  overflow: hidden !important;
}

.credits .bar > div {
  background: var(--blue) !important;
  border-radius: 4px !important;
}

/* ==========================================================================
   BREADCRUMBS & FILE LISTING
   ========================================================================== */
#breadcrumbs {
  font-family: var(--font-family) !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  color: var(--textPrimary) !important;
  padding: 16px 24px 8px 24px !important;
  display: flex !important;
  align-items: center !important;
}

#breadcrumbs a {
  color: var(--textSecondary) !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  transition: background 0.15s ease !important;
}

#breadcrumbs a:hover {
  background: #e8eaed !important;
  color: var(--textPrimary) !important;
}

main, #listing {
  background-color: var(--background) !important;
}

/* Mosaic / Grid View - Google Drive Cards */
#listing.mosaic {
  padding: 8px 16px !important;
}

#listing.mosaic .item {
  background: var(--surfacePrimary) !important;
  border: 1px solid var(--borderPrimary) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  padding: 12px 14px !important;
  margin: 6px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#listing.mosaic .item:hover {
  background: #ffffff !important;
  box-shadow: 0 1px 3px 1px rgba(60,64,67,.15), 0 1px 2px 0 rgba(60,64,67,.3) !important;
  border-color: #c7c7c7 !important;
}

#listing.mosaic .item .name {
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  color: var(--textPrimary) !important;
}

#listing.mosaic .item i {
  color: var(--icon-blue) !important;
}

/* Hide folder size dash placeholder in grid/mosaic cards */
#listing.mosaic .item[data-dir="true"] .size {
  display: none !important;
}

#listing.mosaic .item .modified,
#listing.mosaic .item .size {
  font-size: 12px !important;
  color: var(--textTertiary) !important;
  margin-top: 2px !important;
}

/* Selected File / Folder in Google Blue */
#listing .item[aria-selected="true"] {
  background: var(--item-selected) !important;
  border-color: var(--item-selected-border) !important;
  color: var(--item-selected-text) !important;
}

#listing .item[aria-selected="true"] .name {
  color: var(--item-selected-text) !important;
  font-weight: 600 !important;
}

#listing .item[aria-selected="true"] i {
  color: var(--blue) !important;
}

/* List View - Clean Google Drive Rows */
#listing.list {
  background: var(--surfacePrimary) !important;
  border: 1px solid var(--borderSecondary) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin: 12px 24px !important;
  width: calc(100% - 48px) !important;
}

#listing.list .item.header {
  background: #f8fafd !important;
  border-bottom: 1px solid var(--borderPrimary) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--textSecondary) !important;
  padding: 10px 16px !important;
}

#listing.list .item {
  background: var(--surfacePrimary) !important;
  border-bottom: 1px solid #f1f3f4 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 8px 16px !important;
  height: 48px !important;
  transition: background-color 0.12s ease !important;
}

#listing.list .item:hover {
  background: #f1f3f4 !important;
}

#listing.list .item[aria-selected="true"] {
  background: var(--item-selected) !important;
}

#listing.list .item .name {
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: var(--textPrimary) !important;
}

#listing.list .item .size,
#listing.list .item .modified {
  font-size: 13px !important;
  color: var(--textTertiary) !important;
}

/* Folder icon in Drive Slate Blue */
#listing .item[data-dir="true"] i {
  color: #5f6368 !important;
}

#listing .item[data-dir="true"]:hover i {
  color: var(--blue) !important;
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */
.card, .modal {
  border-radius: 24px !important;
  border: 1px solid var(--borderSecondary) !important;
  box-shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15) !important;
  background: #ffffff !important;
  padding: 24px !important;
}

.card h1, .card h2, .card h3 {
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  color: var(--textPrimary) !important;
}

.card .button {
  border-radius: 20px !important;
  font-weight: 500 !important;
  height: 38px !important;
  padding: 0 20px !important;
}

.card .button--flat {
  color: var(--blue) !important;
  background: transparent !important;
}

.card .button--flat:hover {
  background: var(--hover) !important;
}

.Vue-Toastification__toast {
  border-radius: 12px !important;
  font-family: var(--font-family) !important;
  font-size: 14px !important;
  box-shadow: 0 2px 6px rgba(60,64,67,.2) !important;
}

/* ==========================================================================
   HIDE UPSTREAM RETIREMENT / SUNSET NOTICES ONLY
   ========================================================================== */
.card:has(a[href*="filebrowser#security"]) {
  display: none !important;
}

/* ==========================================================================
   USER MANAGEMENT (GOOGLE WORKSPACE ADMIN CONSOLE STYLE)
   ========================================================================== */
.users-management-view {
  max-width: 1140px;
  margin: 0 auto;
  padding: 8px 16px 40px 16px;
  box-sizing: border-box;
  width: 100%;
}

.users-overview-bar {
  margin-bottom: 24px;
}

.users-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

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

.users-title-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #e8f0fe;
  color: #1a73e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.users-title-icon i {
  font-size: 26px !important;
}

.users-page-title {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #202124 !important;
  margin: 0 0 4px 0 !important;
  letter-spacing: -0.2px;
}

.users-page-subtitle {
  font-size: 13px !important;
  color: #5f6368 !important;
  margin: 0 !important;
}

.btn-create-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a73e8 !important;
  color: #ffffff !important;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-create-user:hover {
  background: #1557b0 !important;
  box-shadow: 0 2px 6px 2px rgba(60,64,67,0.25);
  color: #ffffff !important;
}

.btn-create-user i {
  font-size: 18px !important;
}

/* Overview Metrics Grid */
.users-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid #e0e2e5;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(60,64,67,0.06);
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon i {
  font-size: 22px !important;
}

.metric-icon--blue {
  background: #e8f0fe;
  color: #1a73e8;
}

.metric-icon--green {
  background: #e6f4ea;
  color: #137333;
}

.metric-icon--amber {
  background: #fef7e0;
  color: #b06000;
}

.metric-icon--purple {
  background: #f3e8fd;
  color: #8430ce;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: #202124;
  line-height: 1.1;
}

.metric-label {
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
  margin-top: 2px;
}

/* Card & Toolbar */
.users-table-card.card {
  padding: 0 !important;
  border-radius: 20px !important;
  border: 1px solid #dadce0 !important;
  box-shadow: 0 1px 3px rgba(60,64,67,0.08) !important;
  overflow: hidden;
  background: #ffffff !important;
}

.users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8eaed;
  background: #ffffff;
  flex-wrap: wrap;
  gap: 12px;
}

.users-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 280px;
  max-width: 420px;
}

.users-search-box .search-icon {
  position: absolute;
  left: 14px;
  font-size: 20px;
  color: #5f6368;
  pointer-events: none;
}

.users-search-input {
  width: 100%;
  height: 40px;
  border-radius: 20px !important;
  border: 1px solid #dadce0 !important;
  padding: 0 36px 0 42px !important;
  font-size: 13.5px !important;
  background: #f8fafd !important;
  color: #202124 !important;
  box-sizing: border-box !important;
  transition: all 0.2s !important;
}

.users-search-input:focus {
  background: #ffffff !important;
  border-color: #1a73e8 !important;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.18) !important;
}

.users-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #5f6368;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.users-search-clear:hover {
  background: #e8eaed;
}

.users-search-clear i {
  font-size: 16px;
}

.users-filter-pills {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-pill {
  border: 1px solid #dadce0 !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #444746 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.15s !important;
}

.filter-pill:hover {
  background: #f1f3f4 !important;
}

.filter-pill.active {
  background: #e8f0fe !important;
  border-color: #1a73e8 !important;
  color: #1a73e8 !important;
  font-weight: 600 !important;
}

.filter-pill .pill-icon {
  font-size: 14px !important;
}

/* Data Table */
.users-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.users-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.users-data-table thead tr {
  background: #f8fafd;
}

.users-data-table th {
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #e0e2e5;
}

.users-data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.users-table-row:hover td {
  background: #f8fafd;
}

.user-profile-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.user-name-meta {
  display: flex;
  flex-direction: column;
}

.user-username-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-display-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #202124;
}

.badge-current-user {
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.user-meta-sub {
  font-size: 12px;
  color: #5f6368;
  margin-top: 2px;
}

.meta-dot {
  margin: 0 4px;
}

/* Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

.role-badge--admin {
  background: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #d2e3fc;
}

.role-badge--admin i {
  font-size: 15px;
  color: #1a73e8;
}

.role-badge--standard {
  background: #f1f3f4;
  color: #444746;
  border: 1px solid #dadce0;
}

.role-badge--standard i {
  font-size: 15px;
  color: #5f6368;
}

/* Scope Cell */
.scope-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafd;
  border: 1px solid #e0e2e5;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-family: monospace;
  color: #3c4043;
}

.scope-icon {
  font-size: 16px;
  color: #5f6368;
}

/* Permissions overview */
.perm-pill--all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e6f4ea;
  color: #137333;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.perm-pill--all i {
  font-size: 15px;
}

.perm-icons-list {
  display: flex;
  gap: 6px;
  align-items: center;
}

.perm-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f4;
  color: #bdc1c6;
}

.perm-chip.active {
  background: #e8f0fe;
  color: #1a73e8;
}

.perm-chip i {
  font-size: 16px;
}

/* Actions */
.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.btn-action-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: #1a73e8;
  background: #e8f0fe;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-action-edit:hover {
  background: #d2e3fc;
  color: #1557b0;
}

.btn-action-edit i {
  font-size: 15px;
}

.btn-action-delete {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action-delete:hover {
  background: #fce8e6;
  color: #d93025;
}

.btn-action-delete i {
  font-size: 18px;
}

.btn-action-locked {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dadce0;
}

.btn-action-locked i {
  font-size: 16px;
}

/* Empty State */
.users-empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.empty-state-icon i {
  font-size: 28px;
}

.empty-state-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #202124 !important;
  margin: 0 0 6px 0 !important;
}

.empty-state-text {
  font-size: 13.5px !important;
  color: #5f6368 !important;
  margin: 0 0 16px 0 !important;
}

.btn-clear-search {
  background: #1a73e8;
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ==========================================================================
   USER EDIT & CREATE VIEW
   ========================================================================== */
.user-edit-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 16px 40px 16px;
  box-sizing: border-box;
  width: 100%;
}

.user-edit-header-nav {
  margin-bottom: 16px;
}

.user-back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1a73e8;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 16px;
  transition: background 0.15s;
}

.user-back-button:hover {
  background: #e8f0fe;
}

.user-back-button i {
  font-size: 18px;
}

.user-edit-card.card {
  padding: 32px !important;
  border-radius: 20px !important;
  border: 1px solid #dadce0 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(60,64,67,0.1) !important;
}

.user-edit-title-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8eaed;
}

.user-edit-avatar-badge .avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.avatar-circle--new {
  background: #e6f4ea !important;
  color: #137333 !important;
}

.avatar-circle--new i {
  font-size: 24px;
}

.user-edit-title-text {
  flex: 1;
}

.user-edit-title-text h2 {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #202124 !important;
  margin: 0 !important;
}

.user-title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-edit-subtitle {
  font-size: 13px !important;
  color: #5f6368 !important;
  margin: 4px 0 0 0 !important;
}

.user-edit-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e8eaed;
}

.action-bar-spacer {
  flex-grow: 1;
}

.btn-user-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #fad2cf !important;
  background: #fce8e6 !important;
  color: #c5221f !important;
  border-radius: 20px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}

.btn-user-delete:hover {
  background: #fad2cf !important;
  color: #b71c1c !important;
}

.btn-user-cancel {
  background: #f1f3f4 !important;
  border: 1px solid #dadce0 !important;
  color: #3c4043 !important;
  border-radius: 20px !important;
  padding: 9px 20px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}

.btn-user-cancel:hover {
  background: #e8eaed !important;
}

.btn-user-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a73e8 !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding: 9px 24px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(60,64,67,0.3) !important;
  transition: all 0.15s !important;
}

.btn-user-save:hover {
  background: #1557b0 !important;
  box-shadow: 0 2px 6px rgba(60,64,67,0.3) !important;
}

/* Shared Management Empty State */
.shares-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.shares-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.shares-empty-icon i {
  font-size: 28px;
}

.shares-empty-state h3 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #202124 !important;
  margin: 0 0 6px 0 !important;
}

.shares-empty-state p {
  font-size: 13.5px !important;
  color: #5f6368 !important;
  margin: 0 !important;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

