/* Voice Log - Custom Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Color Variables */
:root {
  /* Primary Colors */
  --primary-main: #8B5CF6;
  --primary-light: #A78BFA;
  --primary-dark: #7C3AED;
  
  /* Secondary Colors */
  --secondary-blue: #3B82F6;
  --secondary-green: #10B981;
  --secondary-purple: #8B5CF6;
  --secondary-orange: #F59E0B;
  
  /* Background Colors */
  --bg-main: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-sidebar: #F1F5F9;
  
  /* Text Colors */
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  
  /* Border Colors */
  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-colored-primary: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
  --shadow-colored-green: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
  --shadow-colored-blue: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Header Styles */
.header {
  height: 80px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-container {
  height: 100%;
  padding: 0 var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.25rem;
  order: -1;
}

.mobile-menu-toggle:hover {
  background: var(--bg-secondary);
}

.header-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

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

.header-search {
  flex: 1;
  max-width: 400px;
  margin: 0 var(--spacing-xl);
}

.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 2.75rem 0 2.5rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--bg-main);
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-main);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover {
  background: var(--bg-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.new-post-btn {
  background: var(--secondary-green);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  box-shadow: var(--shadow-colored-green);
  transition: all 0.15s ease;
}

.new-post-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
  color: white;
}

.action-button {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.15s ease;
}

.action-button:hover {
  background: var(--bg-secondary);
}

.user-menu-button {
  gap: var(--spacing-sm);
  padding: 0 var(--spacing-sm);
  width: auto;
  min-width: 40px;
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #EF4444;
  color: white;
  font-size: 0.625rem;
  padding: 1px 4px;
  border-radius: 6px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dropdown Styles */
.dropdown-menu {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0;
}

.user-dropdown {
  min-width: 200px;
}

.user-info {
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.user-info-name {
  font-weight: 600;
  color: var(--text-primary);
}

.user-info-email {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dropdown-item {
  padding: 0.75rem var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 80px;
  width: 280px;
  height: calc(100vh - 80px);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  z-index: 40;
  transform: translateX(0);
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  /* Smooth scrolling */
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

/* Webkit scrollbar styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.sidebar-content {
  padding: var(--spacing-md) 0;
  min-height: 100%;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-nav {
  padding: 0 var(--spacing-md);
}

.nav-section {
  margin-bottom: var(--spacing-xl);
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 0.75rem var(--spacing-md);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item i {
  font-size: 18px;
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.1);
  transform: translateX(2px);
  color: var(--text-primary);
}

.nav-item.active {
  color: var(--primary-main);
  background: rgba(139, 92, 246, 0.1);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary-main);
  border-radius: 0 2px 2px 0;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 80px);
  padding: var(--spacing-xl);
  transition: margin-left 0.3s ease;
}

.main-content.with-sidebar {
  margin-left: 280px;
}

.content-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Page Header */
.page-header {
  margin-bottom: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-header .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0.25rem 0 0 0;
}

/* Cards */
.card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: auto;
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: var(--spacing-lg);
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

.stats-card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats-card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.stats-icon {
  font-size: 20px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-icon.pending { color: var(--secondary-orange); }
.stats-icon.active { color: var(--secondary-blue); }
.stats-icon.recent { color: var(--secondary-purple); }
.stats-icon.notifications { color: var(--secondary-green); }

.stats-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stats-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-main);
  color: white;
  padding: 0.375rem 0.875rem;
  box-shadow: var(--shadow-colored-primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
}

.btn-success {
  background: var(--secondary-green);
  color: white;
  box-shadow: var(--shadow-colored-green);
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-outline-primary {
  border: 1px solid var(--primary-main);
  color: var(--primary-main);
}

.btn-outline-primary:hover {
  background: var(--primary-main);
  color: white;
}

.btn-sm {
  font-size: 0.875rem;
  padding: 0.375rem 0.875rem;
}

/* Tables */
.table {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 0;
}

.table thead th {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  position: relative;
}

.table thead th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: var(--border-light);
}

.table tbody td {
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(139, 92, 246, 0.05);
  transform: translateY(-1px);
  transition: all 0.15s ease-in-out;
}

/* Table Action Buttons */
.table .btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  margin-right: 0.25rem;
}

/* Forms */
.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.form-control:focus {
  border-color: var(--primary-main);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Audio Player */
.audio-player {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.audio-player audio {
  width: 100%;
  height: 40px;
}

/* Post Content */
.post-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.post-main {
  min-width: 0;
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
}

.post-transcript {
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  line-height: 1.7;
}

/* Flash Messages */
.flash-messages {
  margin-bottom: var(--spacing-lg);
}

/* Footer */
.footer {
  background: var(--bg-main);
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-2xl);
  transition: margin-left 0.3s ease;
}

.footer.with-sidebar {
  margin-left: 280px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.footer-brand i {
  color: var(--primary-main);
  font-size: 1.25rem;
}

.footer-links {
  display: flex;
  gap: var(--spacing-lg);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--primary-main);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 45;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  .main-content.with-sidebar {
    margin-left: 0;
  }

  .footer.with-sidebar {
    margin-left: 0;
  }
  
  .post-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 var(--spacing-md);
  }
  
  .main-content {
    padding: var(--spacing-md);
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .card-body,
  .card-header {
    padding: var(--spacing-md);
  }
}

/* Utility Classes */
.text-muted {
  color: var(--text-muted) !important;
}

.text-primary-color {
  color: var(--primary-main) !important;
}

.bg-light {
  background: var(--bg-secondary) !important;
}

.border-light {
  border-color: var(--border-light) !important;
}