/**
 * Dashboard Styles
 *
 * @license MIT
 * @copyright (c) 2025 Universal AI Cloud Development Team
 * @version 1.2.0
 *
 * Version History:
 * - 1.0.0 (2025-11-23): Initial documentation
 * - 1.1.0 (2025-12-02): Refactored to dashboard-specific styles only
 *   - Extracted shared styles to common.css
 *   - Extracted module styles to mail.css, chats.css, knowledge.css, etc.
 *   - Kept only dashboard-specific layout and page styles
 * - 1.2.0 (2025-12-02): Sidebar architecture cleanup
 *   - Added dashboard-specific sidebar implementation
 *   - Dark theme sidebar with navigation menu
 *   - Mobile responsive with hamburger menu
 *   - Separate from companion sidebar implementation
 */

/* Dashboard-specific layout */
#app {
    display: flex;
    min-height: 100vh;
}

/* Dashboard Sidebar */
.sidebar {
  width: 250px;
  background-color: #2c3e50;
  color: #ecf0f1;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  background-color: #34495e;
  border-bottom: 1px solid #1a252f;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ecf0f1;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  border-bottom: 1px solid #34495e;
}

.sidebar-nav a {
  display: block;
  padding: 15px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.sidebar-nav a:hover {
  background-color: #34495e;
}

.sidebar-nav a.active {
  background-color: #3498db;
}

.nav-auth-container {
  margin-top: 20px;
  padding: 0 20px 15px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #34495e;
}

.copyright-text {
  font-size: 0.6rem;
  color: #7f8c8d;
  text-align: center;
  line-height: 1.4;
}

.auth-button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 4px;
  background-color: #e74c3c;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-button:hover {
  background-color: #c0392b;
}

.auth-button.login {
  background-color: #27ae60;
}

.auth-button.login:hover {
  background-color: #229954;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
}

/* Mobile Header */
.mobile-header {
  display: none;
  height: 60px;
  background-color: #2c3e50;
  color: #ecf0f1;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-header h1 {
  font-size: 1.2rem;
  margin: 0;
  flex: 1;
  text-align: center;
  color: #ecf0f1;
}

.hamburger-button {
  background: none;
  border: none;
  color: #ecf0f1;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.hamburger-button:hover {
  background-color: #34495e;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 24px;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ecf0f1;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-button.active .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-button.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.hamburger-button.active .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
}

#view-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

/* Page Styles */
.page-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-header {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    margin: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
        min-height: 100vh;
    }

    .mobile-header {
        display: flex;
        flex-shrink: 0;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
        transition: transform 0.3s ease;
    }

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

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.visible {
        display: block;
        opacity: 1;
    }

    .main-content {
        padding: 20px;
        width: 100%;
        height: auto;
        overflow-y: visible;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .content-section {
        padding: 20px;
    }

    .table-cell-actions {
        flex-direction: column;
        gap: 5px;
    }

    .email-meta-section {
        padding: 15px;
    }

    .score-display {
        flex-direction: column;
        gap: 10px;
    }
}