/* ============================================
   CLOUD DASHBOARD — SHARED STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #050508;
  --bg-mid: #0a0a0f;
  --bg-surface: #111118;
  --bg-surface-hover: #181820;
  --bg-elevated: #1c1c26;
  --border-subtle: rgba(255,255,255,0.04);
  --border-medium: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.12);
  --text-primary: #f2f2f7;
  --text-secondary: #a0a0b0;
  --text-muted: #5a5a6e;
  --accent: #818cf8;
  --accent-warm: #c084fc;
  --accent-glow: rgba(129,140,248,0.35);
  --success: #34d399;
  --danger: #fb7185;
  --danger-bg: rgba(251,113,133,0.08);
  --warning: #fbbf24;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(129,140,248,0.15);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-mesh::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(129,140,248,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(192,132,252,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 80%, rgba(52,211,153,0.04) 0%, transparent 50%);
  animation: meshFloat 20s ease-in-out infinite;
}
.bg-mesh::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 1%) rotate(0.5deg); }
  66% { transform: translate(-1%, 2%) rotate(-0.5deg); }
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(129,140,248,0.3), transparent 70%);
  top: -100px; right: -100px;
  animation: orbFloat1 15s ease-in-out infinite;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(192,132,252,0.2), transparent 70%);
  bottom: 10%; left: -80px;
  animation: orbFloat2 18s ease-in-out infinite;
}
.orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(52,211,153,0.15), transparent 70%);
  top: 40%; right: 10%;
  animation: orbFloat3 12s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 20px) scale(1.1); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(0.9); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -20px) scale(1.05); }
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 28px;
  position: relative;
  z-index: 1;
}

/* ============================================
   BRAND / HEADER
   ============================================ */

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(129,140,248,0.3), 0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative;
  overflow: hidden;
}
.brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent 50%);
}
.brand-icon svg { position: relative; z-index: 1; }
.brand-text h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.brand-text p {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.2px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(129,140,248,0.25), 0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 50%);
  pointer-events: none;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(129,140,248,0.35), 0 0 0 1px rgba(255,255,255,0.15) inset;
  filter: brightness(1.08);
}
.btn:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  box-shadow: 0 0 0 1px var(--border-medium) inset;
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
  filter: none;
}
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  box-shadow: 0 0 0 1px rgba(251,113,133,0.15) inset;
}
.btn-danger:hover {
  background: rgba(251,113,133,0.15);
  box-shadow: 0 0 0 1px rgba(251,113,133,0.25) inset;
  filter: none;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}
.btn-full {
  width: 100%;
}

/* ============================================
   GLASS CARD
   ============================================ */

.glass-card {
  background: linear-gradient(135deg, rgba(17,17,24,0.85), rgba(17,17,24,0.6));
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,0.03) inset;
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-track {
  width: 100%;
  height: 12px;
  background: var(--bg-mid);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm), var(--accent));
  background-size: 200% 100%;
  border-radius: 6px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 24px rgba(129,140,248,0.3);
  animation: progressShimmer 3s ease-in-out infinite;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  border-radius: 0 6px 6px 0;
}
@keyframes progressShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,8,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(16px);
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: linear-gradient(135deg, rgba(28,28,38,0.95), rgba(17,17,24,0.98));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.5);
  animation: modalIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* ============================================
   DROP ZONE
   ============================================ */

.drop-zone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 52px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 24px;
  background: var(--bg-mid);
  position: relative;
  overflow: hidden;
}
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(129,140,248,0.03), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.drop-zone:hover::before, .drop-zone.dragover::before { opacity: 1; }
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(129,140,248,0.03);
}
.drop-zone svg {
  margin-bottom: 16px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.drop-zone p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.drop-zone .hint {
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.drop-zone input[type="file"] { display: none; }

/* ============================================
   FILE LIST
   ============================================ */

.file-list {
  margin-bottom: 24px;
  max-height: 200px;
  overflow-y: auto;
}
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-mid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.file-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface);
}
.file-item .remove-file {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}
.file-item .remove-file:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* ============================================
   TOAST
   ============================================ */

.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: linear-gradient(135deg, rgba(28,28,38,0.98), rgba(17,17,24,0.98));
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-medium);
  border: 1px solid var(--border-medium);
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-color: rgba(52,211,153,0.2); }
.toast.success::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(52,211,153,0.5);
  flex-shrink: 0;
}
.toast.error { border-color: rgba(251,113,133,0.2); }
.toast.error::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(251,113,133,0.5);
  flex-shrink: 0;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-mid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.25s;
  outline: none;
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.1), 0 0 20px rgba(129,140,248,0.05);
  background: var(--bg-surface);
}
.form-input[type="password"] {
  letter-spacing: 3px;
  font-size: 16px;
}

/* ============================================
   MISC
   ============================================ */

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.section-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-surface);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.3px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 24px 16px; }
  .orb { display: none; }
}
