/* frontend/style.css */
:root {
  --primary-color: #1a73e8;
  --error-color: #dc3545;
  --text-color: #333;
  --border-color: #dee2e6;
  --header-height: 60px;
  --footer-height: 60px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Header styles */
.header {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  min-height: var(--header-height);
}

.logo img {
  height: 100px;
  width: auto;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 1rem;
  flex-grow: 1;
}

.tab-button {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
}

/* Dashboard container */
.dashboard-container {
  padding: 0;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  width: 100%;
  overflow: hidden;
}

.dashboard {
  display: none;
  width: 100%;
  height: 100%;
}

.dashboard.active {
  display: block;
}

.dashboard iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

/* User menu */
.user-menu {
  position: relative;
}

.user-menu-button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 200px;
}

.user-menu-dropdown.active {
  display: block;
}

.user-menu-item {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-color);
  cursor: pointer;
}

.user-menu-item.danger {
  color: var(--error-color);
}

/* Login styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-logo {
  display: block;
  margin: 0 auto 2rem;
  max-width: 200px;
  height: auto;
}

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

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

.login-button {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.error-message {
  color: var(--error-color);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Footer */
.footer {
  padding: 1rem;
  background: #f8f9fa;
  border-top: 1px solid var(--border-color);
  height: var(--footer-height);
  min-height: var(--footer-height);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  :root {
    --header-height: 160px;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
    height: auto;
    min-height: var(--header-height);
  }
  
  .logo {
    text-align: center;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
  }
  
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.5rem 0;
    padding: 0.5rem;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
  }

  .tab-button {
    flex: 0 0 auto;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    min-width: max-content;
    margin-right: 0.25rem;
  }
  
  .tab-button:last-child {
    margin-right: 1rem;
  }
  
  .user-menu {
    margin-top: 0.75rem;
    padding: 0 1rem;
  }
}