* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login page styles */
.container {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

h2 {
  margin-bottom: 1rem;
  color: #555;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: #667eea;
}

button {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

.error {
  background: #fee;
  color: #c33;
  padding: 0.75rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #fcc;
}

.success {
  background: #efe;
  color: #3c3;
  padding: 0.75rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #cfc;
}

/* Dashboard Layout */
.dashboard-body {
  background: #f5f5f5;
  min-height: 100vh;
  display: block;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  margin: 0;
}

.dashboard-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styles */
.sidebar {
  width: 300px;
  background: #2c3e50;
  color: white;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

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

.sidebar-header h1 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: left;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
}

.user-icon {
  font-size: 1.2rem;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

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

/* Dashboard Link */
.dashboard-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  margin: 0 0 1rem 0;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-left: 4px solid #667eea;
  transition: all 0.2s;
}

.dashboard-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #764ba2;
}

.dashboard-icon {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.nav-section {
  margin-bottom: 0.5rem;
}

.nav-section-toggle {
  width: 100%;
  background: transparent;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-section-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toggle-icon {
  font-size: 0.7rem;
  display: inline-block;
  width: 1rem;
}

.nav-section-content {
  display: none;
  padding-left: 1rem;
}

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

.nav-item {
  margin: 0.25rem 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  color: #bdc3c7;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-folder-toggle {
  width: 100%;
  background: transparent;
  color: #bdc3c7;
  border: none;
  padding: 0.5rem 1.5rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-folder-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-folder-content {
  padding-left: 1rem;
}

.nav-empty {
  padding: 0.5rem 1.5rem;
  color: #7f8c8d;
  font-size: 0.85rem;
  font-style: italic;
}

.file-icon,
.folder-icon {
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #34495e;
  background: #1a252f;
}

.sidebar-link {
  display: block;
  color: #bdc3c7;
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.2s;
  font-size: 0.9rem;
}

.sidebar-link:hover {
  color: white;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
}

.content-header {
  padding: 1.5rem 2rem;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.content-header h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin: 0;
}

/* Breadcrumb Styles */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb-project {
  font-weight: 600;
  color: #667eea;
}

.breadcrumb-separator {
  color: #bdc3c7;
  font-weight: 300;
}

.breadcrumb-part {
  color: #7f8c8d;
}

.breadcrumb-current {
  color: #2c3e50;
  font-weight: 600;
}

.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: #f9f9f9;
}

/* Welcome Screen */
.welcome-screen {
  max-width: 900px;
  margin: 0 auto;
}

.welcome-screen h1 {
  color: #2c3e50;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.user-info-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info-card p {
  margin-bottom: 0.75rem;
  color: #555;
  font-size: 1rem;
}

.user-info-card strong {
  color: #333;
  font-weight: 600;
}

.info-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.info-box p {
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.info-box ul {
  margin-left: 1.5rem;
  color: #555;
}

.info-box ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Markdown Content Styles */
.markdown-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
}

.markdown-content h1 {
  color: #2c3e50;
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.markdown-content h3 {
  color: #34495e;
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.markdown-content h4 {
  color: #34495e;
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.markdown-content p {
  color: #555;
  margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
  color: #555;
}

.markdown-content li {
  margin-bottom: 0.5rem;
}

.markdown-content code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #c7254e;
}

.markdown-content pre {
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-left: 3px solid #667eea;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
  color: #333;
}

.markdown-content blockquote {
  border-left: 4px solid #667eea;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.markdown-content th {
  background: #667eea;
  color: white;
  font-weight: 600;
}

.markdown-content tr:nth-child(even) {
  background: #f9f9f9;
}

.markdown-content a {
  color: #667eea;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 1rem 0;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
  }

  .content-body {
    padding: 1rem;
  }

  .markdown-content {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: 40vh;
  }

  .main-content {
    height: 60vh;
  }
}
