/* ==========================================================================
   CloudVault - Advanced Glassmorphism UI Design System
   ========================================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Color Palette */
  --bg-dark: #0a0d14;
  --bg-card: rgba(22, 28, 45, 0.65);
  --bg-card-hover: rgba(30, 39, 64, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --teal: #14b8a6;
  --teal-glow: rgba(20, 184, 166, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-light: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(59, 130, 246, 0.3);
  --error: #ef4444;
  --success: #10b981;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Animated Glowing Background Elements */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-glow);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-glow);
  bottom: -150px;
  right: -150px;
  animation-delay: -6s;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: var(--teal-glow);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 60px) scale(0.95); }
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* View Screens */
.view-screen {
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.view-screen.active {
  display: block;
  opacity: 1;
}

/* Glass Panels & Modals */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
}

/* ==========================================================================
   AUTHENTICATION SCREEN
   ========================================================================== */
#authScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-wrapper {
  width: 100%;
  max-width: 440px;
}

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

.brand-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  box-shadow: var(--shadow-glow);
  margin-bottom: 1rem;
}

.brand-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.auth-card {
  padding: 2rem;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-form.hidden-form {
  display: none;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(0, 0, 0, 0.5);
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.toggle-pwd-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.toggle-pwd-btn:hover {
  color: var(--text-primary);
}

.auth-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* Alert Boxes */
.alert-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-box.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-box.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-box.hidden {
  display: none;
}

/* Buttons */
.btn-primary {
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary.glow-btn {
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-secondary {
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.w-full {
  width: 100%;
}

/* ==========================================================================
   DASHBOARD SCREEN
   ========================================================================== */
.glass-header {
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon-sm {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.user-badge i {
  color: var(--primary);
}

.dashboard-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem 2rem;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.header-text h2 {
  font-size: 1.8rem;
  font-weight: 700;
}

.header-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.header-text code {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 450px;
}

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

.search-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.stats-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.vault-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;

}

.vault-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.vault-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.vault-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-icon-wrap {
  width: 46px;
  height: 46px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

.card-meta {
  text-align: right;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.card-count-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-files-list {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.card-file-item span.fname {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.card-file-item span.fsize {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-download {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--teal), var(--primary));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--teal-glow);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-edit {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-edit:hover {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

/* Floating Action Button (FAB) */
.fab-btn {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 30px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 40;
}

.fab-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 15px 35px var(--accent-glow);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 480px;
  margin: 3rem auto;
}

.empty-icon {
  font-size: 54px;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   MODAL & DRAG/DROP ZONE (Spacious, Clean & Cyber Aesthetic)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden-modal {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.glass-modal {
  background: rgba(16, 22, 36, 0.96);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(59, 130, 246, 0.12);
  padding: 2.25rem;
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.glass-modal::-webkit-scrollbar {
  width: 6px;
}

.glass-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

.modal-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.modal-header h3 i {
  color: var(--primary);
  font-size: 1.2rem;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1rem;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: -2px;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
  transform: rotate(90deg);
}

/* Modal Form Layout */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.input-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.label-hint {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Custom Icon Upload Widget */
.icon-upload-card {
  background: rgba(10, 15, 28, 0.65);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.icon-upload-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(14, 20, 36, 0.75);
}

.icon-preview-box {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 2px dashed rgba(59, 130, 246, 0.35);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.icon-preview-box:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
  transform: scale(1.03);
}

.icon-preview-box img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  display: none;
}

.icon-preview-box i {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: var(--transition);
}

.icon-preview-box:hover i {
  color: var(--primary);
}

.icon-upload-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.icon-upload-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.icon-upload-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.icon-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-danger-ghost {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* File Drop Zone */
.drop-zone {
  border: 2px dashed rgba(59, 130, 246, 0.35);
  background: rgba(10, 15, 30, 0.55);
  border-radius: var(--radius-md);
  padding: 1.85rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.drop-zone-compact {
  padding: 1.25rem 1rem;
}

.hidden-file-input {
  display: none;
}

.drop-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.drop-icon-circle-sm {
  width: 38px;
  height: 38px;
  font-size: 16px;
  margin-bottom: 0.15rem;
}

.drop-zone:hover .drop-icon-circle {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 15px var(--primary-glow);
}

.drop-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  margin: 0;
}

.drop-text b {
  color: var(--primary);
}

.drop-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.drop-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.drop-actions-row button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.drop-actions-row button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* File List Preview */
.files-preview-list {
  margin-top: 0.75rem;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.6rem;
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  scrollbar-width: thin;
}

.files-preview-list.hidden {
  display: none;
}

.file-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.file-preview-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(59, 130, 246, 0.2);
}

.file-preview-item span.fname {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e2e8f0;
}

.file-preview-item span.fname i {
  color: var(--primary);
}

.file-preview-item button {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.file-preview-item button:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glow);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 200;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.hidden-toast {
  transform: translate(-50%, 40px);
  opacity: 0;
  pointer-events: none;
}

.toast i {
  font-size: 1.1rem;
  color: var(--teal);
}

/* ==========================================================================
   MOBILE RESPONSIVE — Android & iOS (Full Fix)
   ========================================================================== */

/* Disable heavy blur on mobile for performance */
@media (max-width: 768px) {
  .ambient-glow {
    display: none;
  }

  /* Auth Screen */
  #authScreen {
    padding: 1rem 0.75rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .auth-wrapper {
    max-width: 100%;
  }

  .brand-header h1 {
    font-size: 1.8rem;
  }

  .brand-header p {
    font-size: 0.85rem;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .tab-btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    gap: 0.3rem;
  }

  .input-group input,
  .input-group textarea {
    font-size: 1rem; /* Prevents iOS auto-zoom on focus */
    padding: 0.85rem 0.9rem;
    -webkit-appearance: none;
    appearance: none;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 0.95rem;
    padding: 0.9rem 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Navbar */
  .top-nav {
    padding: 0.75rem 1rem;
    flex-wrap: nowrap;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .brand-icon-sm {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .nav-user {
    gap: 0.6rem;
  }

  .user-badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
  }

  .btn-secondary {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  /* Dashboard */
  .dashboard-container {
    padding: 1.25rem 1rem 8rem 1rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-text h2 {
    font-size: 1.4rem;
  }

  .header-text p {
    font-size: 0.85rem;
  }

  .btn-add-card {
    width: 100%;
    justify-content: center;
  }

  /* Dashboard tabs */
  .dashboard-tabs {
    gap: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dashboard-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-link {
    white-space: nowrap;
    font-size: 0.9rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Filter bar */
  .filter-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .search-wrapper input {
    font-size: 1rem; /* Prevents iOS auto-zoom */
    -webkit-appearance: none;
  }

  /* Cards Grid - single column on phones */
  .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .vault-card {
    padding: 1.1rem;
  }

  .card-title {
    font-size: 1.05rem;
  }

  .card-desc {
    font-size: 0.85rem;
    -webkit-line-clamp: 3;
  }

  .card-file-item {
    font-size: 0.78rem;
  }

  .card-footer {
    gap: 0.5rem;
  }

  .btn-download {
    font-size: 0.85rem;
    padding: 0.65rem;
  }

  .btn-edit,
  .btn-delete {
    width: 40px;
    height: 40px;
  }

  /* FAB Button */
  .fab-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  /* Modal */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .glass-modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1.15rem 2.25rem 1.15rem;
  }

  .modal-header {
    padding-bottom: 0.85rem;
    margin-bottom: 1.15rem;
  }

  .modal-header h3 {
    font-size: 1.15rem;
  }

  .modal-subtitle {
    font-size: 0.8rem;
  }

  .modal-form {
    gap: 1.15rem;
  }

  .icon-upload-card {
    padding: 0.85rem;
    gap: 0.9rem;
  }

  .icon-preview-box {
    width: 56px;
    height: 56px;
  }

  .icon-preview-box img {
    width: 56px;
    height: 56px;
  }

  .drop-zone {
    padding: 1.4rem 1rem;
    gap: 0.25rem;
  }

  .drop-icon-circle {
    width: 42px;
    height: 42px;
    font-size: 18px;
    margin-bottom: 0.2rem;
  }

  .drop-text {
    font-size: 0.86rem;
  }

  .drop-subtext {
    font-size: 0.74rem;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.65rem;
    padding-top: 1rem;
  }

  .modal-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Empty State */
  .empty-state {
    padding: 3rem 1rem;
    margin: 1rem auto;
  }

  .empty-icon {
    font-size: 44px;
  }

  .empty-state h3 {
    font-size: 1.2rem;
  }

  /* Toast */
  .toast {
    width: 90%;
    left: 50%;
    bottom: 1.5rem;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }

  /* Stats badge */
  .stats-badge {
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
  }
}

/* Small phones (≤ 390px, iPhone SE, Galaxy A etc.) */
@media (max-width: 390px) {
  .brand-header h1 {
    font-size: 1.6rem;
  }

  .auth-card {
    padding: 1rem;
  }

  .glass-modal {
    padding: 1.25rem 1rem 2rem 1rem;
  }

  .cards-grid {
    gap: 0.85rem;
  }
}

/* Tablets (iPad, Android tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
  .dashboard-container {
    padding: 2rem 1.5rem 5rem 1.5rem;
  }

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

  .glass-modal {
    max-width: 520px;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .input-group input,
  .input-group textarea,
  .search-wrapper input {
    font-size: 1rem; /* Prevents iOS auto-zoom */
  }

  .glass-modal {
    /* Fix iOS Safari bottom-sheet bounce */
    padding-bottom: env(safe-area-inset-bottom, 2.5rem);
  }

  .fab-btn {
    /* Account for iOS home indicator bar */
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
}

.hidden {
  display: none !important;
}

