/* 
 * SecureVault - Premium UI Overhaul 
 * Based on Stitch Design Reference
 */

:root {
  --bg-main: #0a0b10;
  --bg-sidebar: #07080b;
  --bg-card: #131022;
  --bg-card-hover: #1b182b;
  --accent-primary: #2c0fbd;
  --accent-secondary: #3e1fd6;
  --text-primary: #ffffff;
  --text-secondary: #8e92a4;
  --text-dim: #5c5f73;
  --border-color: #1a1c26;
  --green-sec: #00e676;
  --orange-sec: #ff9100;
  --purple-sec: #7c4dff;
  --blue-sec: #00b0ff;
  --font-main: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  margin: 0;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- AUTH SCREENS --- */
.login-body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle at top right, #1a0b5c 0%, var(--bg-main) 60%);
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.auth-card {
  background: rgba(19, 16, 34, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

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

.auth-logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 0%, #8e92a4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2.5rem;
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.auth-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.auth-form input {
  width: 100%;
  height: 54px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0 1.25rem;
  color: white;
  font-size: 1rem;
  transition: all 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(44, 15, 189, 0.15);
}

.btn-auth {
  width: 100%;
  height: 54px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s;
}

.btn-auth:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(44, 15, 189, 0.3);
}

.auth-footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.auth-footer a {
  color: var(--accent-primary);
  font-weight: 700;
}

.auth-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  height: 100vh;
  padding: 1.5rem;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  z-index: 1000;
}

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

.brand-logo {
  max-width: 100%;
  height: auto;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.5rem 0 0.8rem 0.8rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(44, 15, 189, 0.15);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(44, 15, 189, 0.3);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-pro {
  background: var(--accent-primary);
  color: white;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* --- TOP HEADER --- */
.top-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  position: sticky;
  top: 0;
  background: rgba(10, 11, 16, 0.8);
  backdrop-filter: blur(12px);
  z-index: 900;
  border-bottom: 1px solid var(--border-color);
}

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

.search-bar {
  width: 100%;
  background: #1a1c26;
  border: 1px solid transparent;
  padding: 12px 16px 12px 40px;
  border-radius: 10px;
  color: white;
  font-size: 0.9rem;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #333;
}

.profile-info {
  text-align: right;
}

.profile-name {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
}

.security-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-sec);
  text-transform: uppercase;
}

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding-bottom: 4rem;
}

.page-container {
  padding: 2rem 2.5rem;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* --- DASHBOARD CARDS --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

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

.card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-body {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.card-value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.card-trend {
  font-size: 0.9rem;
  font-weight: 700;
}

.trend-up { color: var(--green-sec); }
.trend-down { color: var(--orange-sec); }

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  margin-top: 1.5rem;
  position: relative;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 2px;
}

/* --- RECENT ACTIVITY TABLE --- */
.section-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 0;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.view-all {
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
}

.activity-table th {
  text-align: left;
  padding: 1rem 2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
}

.activity-table td {
  padding: 1.2rem 2rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

.service-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.service-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #1c1e29;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.strength-pill {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.strength-pill.strong { background: rgba(0, 230, 118, 0.1); color: var(--green-sec); }
.strength-pill.fair { background: rgba(255, 145, 0, 0.1); color: var(--orange-sec); }
.strength-pill.encrypted { background: rgba(0, 176, 255, 0.1); color: var(--blue-sec); }

/* --- BUTTONS --- */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(44, 15, 189, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  z-index: 1000;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab:hover { transform: scale(1.1); }

/* Mobile Bottom Nav Override */
.bottom-nav {
  display: none;
}

/* --- RESPONSIVE --- */
/* --- COMPONENT: FILTER PILLS --- */
.filters-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(44, 15, 189, 0.3);
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); padding: 0 1.5rem; }
  .top-header { padding: 0 1.5rem; }
  
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    padding: 0.8rem 0;
    justify-content: space-around;
    z-index: 1001;
  }
}

@media (max-width: 600px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .top-header .search-container { display: none; }
  .activity-table th:nth-child(2),
  .activity-table td:nth-child(2),
  .activity-table th:nth-child(4),
  .activity-table td:nth-child(4) { display: none; }
}
