/* CSS Variables */
:root {
  --primary-color: #14b8a6;
  --primary-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --light-bg: #f8fafc;
  --dark-bg: #1e293b;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
  background: #f7f8fa;
  color: #222;
}

.title-bar {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-bottom: 1px solid #e5e7eb;
  padding: 0 32px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-title {
  font-size: 2rem;
  font-weight: 700;
  color: #14b8a6;
  letter-spacing: -1px;
}
.toggle-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: #14b8a6;
  cursor: pointer;
  margin-right: 16px;
}
.banner {
  background: #ccfbf1;
  color: #0f766e;
  text-align: center;
  padding: 8px 0;
  font-size: 1rem;
}
.container {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  min-width: 220px;
  max-width: 260px;
  padding: 32px 0 0 0;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
  transition: transform 0.2s;
  z-index: 10;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar li {
  margin: 0 0 12px 0;
}
.sidebar a {
  display: block;
  padding: 12px 32px;
  color: #14b8a6;
  text-decoration: none;
  border-radius: 8px 0 0 8px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar a:hover, .sidebar a.active {
  background: #ccfbf1;
  color: #0f766e;
}
.main-content {
  flex: 1;
  padding: 40px 32px 32px 32px;
  background: #f7f8fa;
  min-height: 100vh;
}
button, .btn {
  background: #14b8a6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20,184,166,0.08);
  transition: background 0.15s, box-shadow 0.15s;
}
button:hover, .btn:hover {
  background: #14b8a6;
  box-shadow: none;
}
input, select, textarea {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  margin-top: 4px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  transition: border 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: #14b8a6;
  outline: none;
}
.hidden {
  display: none !important;
}
.btn, button, .btn:link, .btn:visited {
  text-decoration: none !important;
}
/* Base button styles */
.btn.faq-btn {
  background: #ffffff;
  color: #222;
  border: none;
  padding: 7px 18px;
  font-size: 1em;
}

/* Navigation buttons in title bar - more specific */
.title-bar .btn.faq-btn.nav-btn {
  padding: 6px 12px;
  font-size: 0.9rem;
}

/* Plus (+) button styles - most specific selector */
.title-bar .btn.faq-btn[href*="create_dealstock"],
.title-bar .btn.faq-btn[href*="login"] {
  padding: 0;
  width: 28px;
  height: 28px;
  min-width: 28px;
  max-width: 28px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: none;
  background: transparent;
  color: #000000;
  border: none;
}

/* Responsive + button sizes */
@media (max-width: 768px) {
  .title-bar .btn.faq-btn[href*="create_dealstock"],
  .title-bar .btn.faq-btn[href*="login"] {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    font-size: 1rem;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .title-bar .btn.faq-btn[href*="create_dealstock"],
  .title-bar .btn.faq-btn[href*="login"] {
    width: 30px;
    height: 30px;
    min-width: 30px;
    max-width: 30px;
    font-size: 1.05rem;
  }
}
.btn.faq-btn:hover {
  color: #14b8a6;
  background: #ffffff;
}


/* Avatar and User Menu Styles */
.user-avatar-small {
  display: inline-block;
  margin-right: 8px;
  cursor: pointer;
}

.user-avatar-small img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.user-avatar-small img:hover {
  transform: scale(1.1);
}

.avatar-placeholder-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #14b8a6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
  cursor: pointer;
  text-align: center;
  line-height: 1;
  overflow: hidden;
}

.avatar-placeholder-small:hover {
  transform: scale(1.1);
}

.user-menu-container {
  position: relative;
  display: inline-block;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  margin-top: 8px;
}

.user-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 8px 8px 0 0;
}

.user-menu-header .username {
  font-weight: 600;
  color: #14b8a6;
  font-size: 0.9rem;
}

.user-menu-items {
  padding: 8px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  background-color: #f1f5f9;
  color: #14b8a6;
}

.menu-item svg {
  color: #64748b;
}

.menu-item:hover svg {
  color: #14b8a6;
}

.logout-btn {
  color: #dc2626 !important;
}

.logout-btn:hover {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
}

.logout-btn svg {
  color: #dc2626 !important;
}

.menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
}


/* Search button specific styles - more specific selector */
.title-bar form[action="/search/"] button.btn.faq-btn {
  padding: 0;
  position: absolute;
  right: 5px;
  top: 5px;
  height: 30px;
  min-width: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
}

/* Search submit button - dedicated class to avoid conflicts */
.btn.search-submit-btn {
  padding: 0;
  position: absolute;
  right: 5px;
  top: 5px;
  height: 30px;
  min-width: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent !important;
  border: none;
  color: #666 !important;
}

.btn.search-submit-btn:hover {
  background: #f3f4f6 !important;
  color: #333 !important;
}

.title-bar form[action="/search/"] button.btn.faq-btn:hover {
  background: #f3f4f6;
}

/* Search input specific styles */
.title-bar form[action="/search/"] input[type="text"] {
  padding: 0 14px;
  padding-right: 50px;
  color: #000 !important;
  background: #fff !important;
  font-family: Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

.title-bar form[action="/search/"] input[type="text"]::placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-family: Arial, sans-serif !important;
  font-size: 16px !important;
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    min-width: 100vw;
    max-width: 100vw;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: none;
    padding: 16px 0 0 0;
  }
  .main-content {
    padding: 24px 8px 16px 8px;
  }
}

