:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #9333ea;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #111827;
  --light: #f9fafb;
  --sidebar-width: 250px;
  --header-height: 70px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f3f4f6;
  color: #1f2937;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Auth Screen */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  padding: 40px;
}

.auth-logo {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo img {
  height: 50px;
}

/* Dashboard Layout */
.dashboard-container {
  display: none; /* Hidden by default until authenticated */
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--dark);
  color: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1030;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-collapsed {
  transform: translateX(-190px);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.sidebar-logo i {
  margin-right: 0.75rem;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.main-content {
  margin-left: var(--sidebar-width);
  transition: margin 0.3s ease;
  min-height: 100vh;
}

.main-collapsed {
  margin-left: 60px;
}

.header {
  height: var(--header-height);
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.toggle-sidebar {
  font-size: 1.5rem;
  cursor: pointer;
  margin-right: 1rem;
  color: var(--dark);
}

.header-search {
  margin-right: auto;
  max-width: 400px;
  width: 100%;
}

.user-menu {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.user-menu img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 0.5rem;
  object-fit: cover;
}

.user-menu span {
  margin-right: 0.5rem;
}

/* Dashboard Main Content */
.content {
  padding: 1.5rem;
}

.page-title {
  margin-bottom: 1.5rem;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stats-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

.stats-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.stats-card-value {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stats-card-change {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.stats-card-change.up {
  color: var(--success);
}

.stats-card-change.down {
  color: var(--danger);
}

.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
}

.link-card {
  margin-bottom: 1rem;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.stats-container {
  display: none;
  margin-top: 1rem;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
}

.click-row:hover {
  background-color: #f1f5f9;
}

.table-responsive {
  max-height: 400px;
  overflow-y: auto;
}

.badge {
  font-size: 0.8em;
  font-weight: 500;
}

.btn {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-control {
  padding: 0.625rem 1rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .main-collapsed {
    margin-left: 0;
  }
}

/* Sync Status Indicator */
.sync-status {
  margin-left: 15px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sync-info {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.sync-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.sync-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}

.sync-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-left: 3px solid var(--warning);
}

/* Border color indicators for link cards */
.border-left-success {
  border-left: 4px solid var(--success);
}

.border-left-primary {
  border-left: 4px solid var(--primary);
}

.border-left-warning {
  border-left: 4px solid var(--warning);
}

.border-left-secondary {
  border-left: 4px solid #6c757d;
}

.border-left-danger {
  border-left: 4px solid var(--danger);
}

/* Smooth animation for delete card */
.link-card {
  transition: opacity 0.3s ease, height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

/* Location Map Styles */
.location-map-container {
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.map-popup {
  min-width: 200px;
  padding: 8px 4px;
}

.map-popup div {
  margin-bottom: 5px;
}

/* Interactive clicks table */
.click-location {
  position: relative;
  transition: all 0.2s ease;
}

.click-location:hover {
  color: var(--primary);
}

.click-location .fa-map-marker-alt {
  font-size: 0.8rem;
}

/* Chart container */
canvas {
  max-width: 100%;
}

/* Improved table styling */
.clicks-table {
  font-size: 0.85rem;
}

.clicks-table th {
  font-weight: 600;
  background-color: #f8fafc;
}

.clicks-table .badge {
  font-weight: 500;
}

/* Country flag animations */
.click-location {
  display: inline-flex;
  align-items: center;
}

/* Alert style improvements */
.alert-info {
  background-color: rgba(79, 70, 229, 0.08);
  border-left: 3px solid var(--primary);
  color: #4338ca;
}

/* Extra styles for responsiveness */
@media (max-width: 768px) {
  .location-map-container {
    height: 200px;
    margin-bottom: 1.5rem;
  }
} 