/* ==========================================================================
   GLOBALMARKET CLOUD DRIVE - STYLESHEET
   ========================================================================== */

:root {
  --drive-bg: #070e0a;
  --drive-card-bg: rgba(14, 26, 20, 0.75);
  --drive-card-border: rgba(255, 255, 255, 0.08);
  --drive-sidebar-bg: #040907;
  --drive-topbar-bg: #09140f;
  --primary-green: #0d5c3a;
  --primary-accent: #15803d;
  --gold-accent: #d97706;
  --gold-light: #fbbf24;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--drive-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.drive-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 25%, #143525 0%, #040907 100%);
  padding: 1.5rem;
}

.drive-login-container {
  width: 100%;
  max-width: 450px;
}

.drive-login-card {
  background: var(--drive-card-bg);
  border: 1px solid var(--drive-card-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  height: 48px;
  margin-bottom: 1.25rem;
  object-fit: contain;
}

.login-header h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.login-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: #fca5a5;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.drive-login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--drive-card-border);
}

.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.back-link, .webmail-link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.2s;
}

.webmail-link {
  color: #60a5fa;
}

.back-link:hover, .webmail-link:hover {
  opacity: 0.8;
}

.security-note {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.drive-topbar {
  background: var(--drive-topbar-bg);
  border-bottom: 1px solid var(--drive-card-border);
  height: 68px;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.drive-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.drive-logo {
  height: 36px;
  object-fit: contain;
}

.drive-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-vault {
  background: var(--primary-green);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.topbar-center {
  flex: 1;
  max-width: 500px;
  margin: 0 2rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--drive-card-border);
  border-radius: 99px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #ffffff;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold-accent);
  background: rgba(0, 0, 0, 0.65);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--drive-card-border);
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
}

.user-role-badge {
  background: var(--gold-accent);
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   LAYOUT & SIDEBAR
   ========================================================================== */
.drive-wrapper {
  display: flex;
  flex: 1;
}

.drive-sidebar {
  width: 250px;
  background: var(--drive-sidebar-bg);
  border-right: 1px solid var(--drive-card-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1rem;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-category {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 1.25rem 0 0.4rem 0.75rem;
}

.sidebar-category:first-child {
  margin-top: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-link.active {
  color: #ffffff;
  background: var(--primary-green);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

.sidebar-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid var(--drive-card-border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.storage-meter {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--drive-card-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.meter-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 1%;
  background: var(--gold-accent);
  border-radius: 99px;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.drive-content {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.view-toggle-group {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--drive-card-border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.btn-view-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.btn-view-toggle.active {
  background: var(--primary-green);
  color: #ffffff;
}

/* Breadcrumbs */
.drive-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--drive-card-border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.crumb-link {
  color: var(--gold-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.crumb-link:hover {
  text-decoration: underline;
}

.crumb-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
}

.crumb-current {
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   FILE EXPLORER: GRID VIEW
   ========================================================================== */
.section-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 1.25rem 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title:first-child {
  margin-top: 0;
}

.folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.folder-card {
  background: rgba(14, 26, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.folder-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(20, 38, 28, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

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

.folder-icon-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.folder-icon-main {
  font-size: 2.2rem;
  color: var(--gold-light);
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.35));
  transition: transform 0.2s;
}

.folder-card:hover .folder-icon-main {
  transform: scale(1.08);
}

.folder-fav-star {
  font-size: 0.9rem;
  color: var(--gold-light);
}

.folder-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.folder-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.folder-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.file-card {
  background: rgba(14, 26, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: visible;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.file-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(20, 38, 28, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.file-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0 1rem;
}

.file-type-pill {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.file-preview-area {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.file-preview-icon {
  font-size: 3.2rem;
  transition: transform 0.2s;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.file-card:hover .file-preview-icon {
  transform: scale(1.08);
}

.file-card-body {
  padding: 0.85rem 1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.file-name {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   3-DOTS CONTEXT DROPDOWN MENU
   ========================================================================== */
.drive-menu-wrapper {
  position: relative;
}

.btn-card-menu {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-card-menu:hover, .btn-card-menu.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.drive-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #0d1a14;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7);
  min-width: 195px;
  padding: 0.4rem;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: dropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.drive-dropdown-menu.show {
  display: flex;
}

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

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  color: #e2e8f0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

.dropdown-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dropdown-menu-item i {
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.dropdown-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.25rem 0;
}

.dropdown-menu-item.danger {
  color: #fca5a5;
}

.dropdown-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
}

/* ==========================================================================
   FILE EXPLORER: LIST VIEW
   ========================================================================== */
.drive-list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--drive-card-bg);
  border: 1px solid var(--drive-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.drive-list-table th {
  padding: 0.85rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--drive-card-border);
  text-align: left;
}

.drive-list-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.drive-list-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-item-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 500;
}

.table-item-name i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Empty State */
.drive-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.drive-empty-state i {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   MODALS (Preview, New Folder, Rename, Users)
   ========================================================================== */
.drive-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.5rem;
}

.drive-modal.show,
.drive-modal.active {
  display: flex !important;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-content {
  background: #0d1a14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 10001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   USER MANAGEMENT MODAL (SAAS TABS & LUXURY CARDS)
   ========================================================================== */
.users-modal-content {
  max-width: 820px !important;
  width: 95vw;
  background: #0a1610 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
  padding: 1.75rem 2rem !important;
}

.modal-header-users {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-group h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Modal Nav Tabs */
.modal-nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1.5rem;
}

.modal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab-btn.active {
  background: rgba(217, 119, 6, 0.18);
  color: var(--gold-light);
  border: 1px solid rgba(217, 119, 6, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-pane.active {
  display: block;
}

/* User Directory Toolbar */
.users-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.users-search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.users-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.users-search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.users-search-input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

/* User Cards List */
.users-cards-list {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.user-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.user-item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.user-main-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.user-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.avatar-superadmin {
  background: linear-gradient(135deg, #d97706, #b45309);
  border: 2px solid rgba(251, 191, 36, 0.5);
}

.avatar-admin {
  background: linear-gradient(135deg, #059669, #047857);
  border: 2px solid rgba(52, 211, 153, 0.5);
}

.avatar-collab {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 2px solid rgba(96, 165, 250, 0.5);
}

.avatar-client {
  background: linear-gradient(135deg, #4b5563, #374151);
  border: 2px solid rgba(156, 163, 175, 0.5);
}

.user-meta-texts {
  overflow: hidden;
  min-width: 0;
}

.user-title-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-name-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-username-badge {
  font-size: 0.8rem;
  color: var(--gold-light);
  font-family: monospace;
}

.user-contact-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.user-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-card-edit {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-card-edit:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-card-del {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-card-del:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
}

/* User Forms (Create & Edit) */
.user-form-wrapper {
  background: rgba(0, 0, 0, 0.35);
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 650px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.form-group-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group-item label {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-group-item .form-hint {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.form-buttons-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Preview Modal Wide */
.preview-modal-content {
  max-width: 90vw;
  width: 1100px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.preview-body {
  flex: 1;
  background: #000000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.preview-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-body video {
  max-width: 100%;
  max-height: 100%;
}

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary-green);
  color: #ffffff;
}

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

.btn-gold {
  background: var(--gold-accent);
  color: #ffffff;
}

.btn-gold:hover {
  background: var(--gold-light);
  color: #111827;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control, .form-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--drive-card-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: #ffffff;
  transition: border-color 0.2s;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-accent);
  background: rgba(0, 0, 0, 0.5);
}

/* Toast */
.drive-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #111827;
  border: 1px solid var(--gold-accent);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drive-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Badges de Roles */
.badge-superadmin {
  background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #f59e0b 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.4);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge-admin {
  background: var(--primary-green) !important;
  color: #ffffff !important;
}

.badge-collab {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.badge-client {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #d1d5db !important;
}

/* ==========================================================================
   DRAG & DROP OVERLAY
   ========================================================================== */
.drag-drop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 9, 7, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius-md);
  pointer-events: none;
}

.drag-drop-overlay.active {
  display: flex;
}

.drag-drop-box {
  border: 3px dashed var(--gold-accent);
  background: rgba(217, 119, 6, 0.08);
  border-radius: var(--radius-lg);
  padding: 3.5rem 4rem;
  text-align: center;
  max-width: 540px;
  width: 100%;
  animation: pulseBorder 1.5s infinite alternate;
}

@keyframes pulseBorder {
  0% { transform: scale(0.98); border-color: var(--gold-accent); box-shadow: 0 0 15px rgba(217, 119, 6, 0.2); }
  100% { transform: scale(1.02); border-color: var(--gold-light); box-shadow: 0 0 35px rgba(251, 191, 36, 0.4); }
}

.drag-drop-icon {
  font-size: 4rem;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  animation: bounceCloud 1s infinite alternate ease-in-out;
}

@keyframes bounceCloud {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.drag-drop-box h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.drag-drop-box p {
  color: var(--text-muted);
  font-size: 1rem;
}

.drag-drop-box p strong {
  color: var(--gold-light);
}

/* ==========================================================================
   SIDEBAR FAVORITES & TRASH BADGE
   ========================================================================== */
.trash-badge-count {
  background: var(--danger);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  margin-left: auto;
}

.sidebar-favorites-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.sidebar-fav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-fav-link:hover {
  background: rgba(251, 191, 36, 0.12);
  color: #ffffff;
}

.sidebar-fav-link i {
  color: var(--gold-light);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-empty-favs {
  padding: 0.4rem 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
  font-style: italic;
}

/* ==========================================================================
   TRASH VIEW BANNER
   ========================================================================== */
.trash-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.trash-banner-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trash-banner-info i {
  font-size: 2rem;
}

.trash-banner-info h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.trash-banner-info p {
  font-size: 0.85rem;
  color: #fca5a5;
  margin: 0;
}

/* ==========================================================================
   CARD & TABLE ACTION BUTTONS (RENAME, FAVORITE, TRASH, PREVIEW, DOWNLOAD)
   ========================================================================== */
.card-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.drive-card:hover .card-quick-actions {
  opacity: 1;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  text-decoration: none;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.08);
}

.btn-card-action.btn-fav.is-favorite {
  color: var(--gold-light);
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
}

.btn-card-action.btn-trash:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.btn-card-action.btn-restore:hover {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.text-gold {
  color: var(--gold-light) !important;
}

.text-danger {
  color: var(--danger) !important;
}

/* Responsive */
@media (max-width: 900px) {
  .drive-wrapper {
    flex-direction: column;
  }
  .drive-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--drive-card-border);
  }
  .topbar-center {
    display: none;
  }
  .drive-content {
    padding: 1.25rem;
  }
}
