/* ========================================
   DRIVE UCUP - Custom Styles
   Exact replica of drive.ucup.web.id
   ======================================== */

:root {
  --bg-dark: #0a0e1a;
  --bg-surface: rgba(17, 24, 39, 0.85);
  --glass-bg: rgba(15, 23, 42, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.3);
  --accent: #818cf8;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #fbbf24;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --row-hover: rgba(59, 130, 246, 0.06);
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-dark) !important;
  color: var(--text-primary) !important;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.font-outfit { font-family: 'Outfit', sans-serif; }

/* ========================
   Animated Background
   ======================== */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-dark);
}

.color-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  animation: float 25s infinite alternate ease-in-out;
}
.orb-1 {
  width: 500px; height: 500px;
  background: #3b82f6;
  top: -15%; left: -10%;
}
.orb-2 {
  width: 600px; height: 600px;
  background: #7c3aed;
  bottom: -25%; right: -15%;
  animation-delay: -7s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: #06b6d4;
  top: 50%; left: 45%;
  animation-delay: -14s;
}

@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -60px) scale(1.05); }
  66%  { transform: translate(-30px, 30px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ========================
   Glassmorphism Card
   ======================== */
.glass-card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px;
  overflow: hidden;
  color: var(--text-primary);
}

/* ========================
   LOGIN VIEW
   ======================== */
.login-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  z-index: 10;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  text-align: center;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-icon-wrapper {
  margin-bottom: 1.2rem;
}
.login-icon-wrapper i {
  font-size: 3rem;
  color: var(--primary);
  filter: drop-shadow(0 0 14px var(--primary-glow));
}

.login-card .input-group-text {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-right: none !important;
  color: var(--text-muted);
}

.login-card .form-control {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: none !important;
  color: #fff !important;
  box-shadow: none !important;
}
.login-card .form-control::placeholder {
  color: var(--text-muted);
}
.login-card .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow) !important;
}

.login-submit-btn {
  height: 44px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--primary) !important;
  border: none !important;
  transition: all 0.25s ease;
}
.login-submit-btn:hover {
  background: #2563eb !important;
  box-shadow: 0 4px 20px var(--primary-glow);
  transform: translateY(-1px);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================
   DASHBOARD VIEW
   ======================== */
.dashboard-wrapper {
  position: relative;
  z-index: 1;
}

/* ---- Navbar ---- */
.glass-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85) !important;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.65rem 0;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary) !important;
  text-decoration: none;
  transition: opacity 0.2s;
}
.navbar-brand-custom:hover {
  opacity: 0.85;
  color: var(--text-primary) !important;
}

.brand-icon {
  color: var(--primary);
  font-size: 1.3rem;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--primary);
}

.btn-logout {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger);
  transition: all 0.2s;
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #ff6b6b;
}

/* ---- Main Container ---- */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 80px;
  padding-bottom: 3rem;
}

/* ---- File Browser Card ---- */
.file-browser {
  border-radius: 16px;
}

/* ---- Breadcrumb ---- */
.breadcrumb-section {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.breadcrumb {
  font-size: 0.88rem;
  gap: 0;
}
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
  content: "/";
  padding: 0 8px;
}
.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}
.breadcrumb-item a:hover {
  color: #fff;
}
.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.hover-glow:hover {
  color: #fff !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

/* ---- Toolbar ---- */
.toolbar-section {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.search-wrapper {
  position: relative;
  max-width: 320px;
  width: 100%;
}
.search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 14px 8px 40px;
  height: 38px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.bulk-btn {
  height: 38px;
  font-size: 0.82rem;
  border-radius: 10px;
  font-weight: 600;
  padding: 0 20px;
  white-space: nowrap;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #fff;
  transition: all 0.25s ease;
}
.bulk-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 20px var(--primary-glow);
  transform: translateY(-1px);
  color: #fff;
}
.bulk-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: var(--text-muted);
}

/* ========================
   File Table
   ======================== */
.table-wrapper {
  overflow-x: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
}

.file-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.file-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 24, 39, 0.95);
  white-space: nowrap;
}

.file-table td {
  padding: 13px 16px;
  vertical-align: middle;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
}

.file-table tbody tr:last-child td {
  border-bottom: none;
}

.file-table tbody tr {
  transition: background 0.15s ease;
}
.file-table tbody tr:hover {
  background: var(--row-hover);
}

/* Column widths */
.col-check { width: 48px; text-align: center; padding-left: 16px !important; }
.col-name { width: auto; }
.col-modified { width: 170px; }
.col-size { width: 100px; }
.col-actions { width: 110px; text-align: right; padding-right: 16px !important; }

/* Checkboxes */
.form-check-input {
  cursor: pointer;
  width: 16px;
  height: 16px;
  background-color: transparent !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
}
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.form-check-input:focus {
  box-shadow: none !important;
}

/* ========================
   File Icons & Links
   ======================== */
.file-icon {
  font-size: 1.1rem;
  margin-right: 10px;
  vertical-align: middle;
}

.folder-icon {
  color: var(--warning);
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.3));
}

.file-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.15s;
}
.file-link:hover {
  color: var(--primary);
}

.file-name-text {
  color: var(--text-primary);
}

/* ========================
   Action Buttons
   ======================== */
.action-btn-group {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.action-btn-group .btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}
.action-btn-group .btn:hover {
  transform: translateY(-1px);
}

.btn-glass {
  background: transparent;
  transition: all 0.2s;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ========================
   Scrollbar & Responsive
   ======================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

@media (max-width: 768px) {
  .main-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .toolbar-section, .breadcrumb-section {
    padding: 10px 16px;
  }
  .search-wrapper {
    max-width: 100%;
  }
  .file-table th, .file-table td {
    padding: 10px 12px;
  }
  .col-modified {
    display: none;
  }
}
