/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  color: #333;
}

/* Login Page Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.auth-language-switcher {
  margin-top: 32px;
}

.auth-language-switcher .language-switcher {
  padding: 0;
}

.login-box h1 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 28px;
  text-align: center;
}

.login-box h2 {
  color: #555;
  margin-bottom: 30px;
  font-size: 24px;
  text-align: center;
  font-weight: 400;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 12px;
}

.form-group ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.form-group ul li {
  color: #721c24;
  font-size: 13px;
  margin-bottom: 4px;
  padding-left: 20px;
  position: relative;
}

.form-group ul li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #dc3545;
}

.form-actions {
  margin-top: 20px;
}

.form-footer {
  margin-top: 20px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.form-footer p {
  color: #666;
  margin: 0;
}

.form-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.form-link:hover {
  color: #5568d3;
  text-decoration: underline;
}

/* Calls Page Styles */
.calls-container {
  min-height: 100vh;
  padding: 20px;
}

.header {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 20px 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  color: #667eea;
  font-size: 32px;
  flex: 1;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #555;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  width: 100%;
}

.language-label {
  color: #666;
  font-weight: 600;
}

.language-options {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-option {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.language-option:hover {
  background: rgba(102, 126, 234, 0.12);
}

.language-option.current {
  color: #333;
  background: #eef1ff;
  cursor: default;
}

/* Header Hamburger Menu (used for all pages) */
.header-menu,
.admin-menu {
  position: relative;
}

.burger-menu-checkbox {
  display: none;
}

.burger-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: all 0.3s ease;
  position: relative;
}

.burger-menu-toggle span {
  width: 100%;
  height: 3px;
  background: #667eea;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
  display: block;
}

.burger-menu-toggle:hover span {
  background: #5568d3;
}

.burger-menu-checkbox:checked ~ .burger-menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu-checkbox:checked ~ .burger-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.burger-menu-checkbox:checked ~ .burger-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.header-menu-dropdown,
.admin-menu-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
}

.burger-menu-checkbox:checked ~ .header-menu-dropdown,
.burger-menu-checkbox:checked ~ .admin-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-menu-header,
.admin-menu-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  color: #555;
  font-size: 14px;
}

.header-menu-header strong,
.admin-menu-header strong {
  color: #333;
}

.header-menu-nav,
.admin-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.header-menu-item,
.admin-menu-item {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.header-menu-item:hover,
.admin-menu-item:hover {
  background: #f8f9fa;
  color: #667eea;
}

.header-menu-item.active {
  background: #e7edff;
  color: #667eea;
  font-weight: 600;
}

.header-menu-item-button,
.admin-menu-item-button {
  color: #dc3545;
}

.header-menu-item-button:hover,
.admin-menu-item-button:hover {
  background: #fff5f5;
  color: #c82333;
}

.header-menu-form,
.admin-menu-form {
  margin: 0;
  padding: 0;
}

.header-menu-divider,
.admin-menu-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 0;
}

.main-content {
  max-width: 800px;
  margin: 0 auto;
}

.calls-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
}

.calls-panel h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 28px;
}

.instructions {
  color: #666;
  margin-bottom: 40px;
  font-size: 16px;
}

.buttons-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.call-form {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

/* Button Styles */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #667eea;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-warning {
  background: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-call {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
  padding: 20px;
  font-size: 18px;
}

.btn-call:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-large {
  padding: 20px 40px;
  font-size: 18px;
}

/* Alert Styles */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-error ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.alert-error ul li {
  margin-bottom: 5px;
}

/* Admin Panel Styles */
.admin-container {
  min-height: 100vh;
  padding: 20px;
}

.admin-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

.admin-panel h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 24px;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.users-table {
  margin-top: 20px;
  overflow-x: auto;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.users-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
}

.users-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
}

.users-table tr:hover {
  background: #f8f9fa;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.approved {
  background: #d4edda;
  color: #155724;
}

.no-items {
  color: #666;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* Logs Table Styles */
.logs-table {
  margin-top: 20px;
  overflow-x: auto;
}

.logs-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.logs-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
}

.logs-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
  vertical-align: top;
}

.logs-table tr:hover {
  background: #f8f9fa;
}

.log-timestamp {
  white-space: nowrap;
  font-family: monospace;
  font-size: 12px;
  color: #666;
}

.log-type {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.log-type-failed-login,
.log-type-call-attempt {
  background: #fff3cd;
  color: #856404;
}

.log-type-successful-login {
  background: #d4edda;
  color: #155724;
}

.log-type-logout {
  background: #d1ecf1;
  color: #0c5460;
}

.log-type-user-registration {
  background: #e2e3e5;
  color: #383d41;
}

.log-type-admin-action {
  background: #f8d7da;
  color: #721c24;
}

.log-details {
  font-size: 12px;
  max-width: 400px;
}

.log-details strong {
  color: #333;
  display: block;
  margin-bottom: 4px;
}

.log-details span {
  display: block;
  margin: 2px 0;
  color: #666;
}

/* Waiting/Verification Page Styles */
.waiting-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.waiting-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 50px 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.waiting-icon {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.waiting-box h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 28px;
}

.waiting-message {
  color: #555;
  font-size: 18px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.waiting-submessage {
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.waiting-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: left;
}

.waiting-info p {
  margin: 10px 0;
  color: #555;
  font-size: 14px;
}

.waiting-info strong {
  color: #333;
  display: inline-block;
  min-width: 140px;
}

.waiting-actions {
  margin-bottom: 20px;
}

.refresh-note {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.refresh-note p {
  color: #888;
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
}

/* Signup Page Specific Styles */
.login-box {
  max-width: 450px; /* Slightly wider for signup form */
}

.login-form .form-group:last-of-type {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .language-switcher {
    padding: 10px 16px;
    font-size: 12px;
  }

  .login-box {
    padding: 30px 20px;
    max-width: 100%;
  }

  .login-box h1 {
    font-size: 24px;
  }

  .login-box h2 {
    font-size: 20px;
  }

  .header {
    flex-wrap: wrap;
    gap: 15px;
  }

  .header h1 {
    font-size: 24px;
  }

  .admin-menu-dropdown {
    right: -10px;
    left: -10px;
    min-width: auto;
    width: calc(100% + 20px);
  }

  .buttons-container {
    flex-direction: column;
  }

  .call-form {
    max-width: 100%;
  }

  .users-table {
    font-size: 14px;
  }

  .users-table th,
  .users-table td {
    padding: 8px;
  }

  .logs-table {
    font-size: 12px;
  }

  .logs-table th,
  .logs-table td {
    padding: 8px;
  }

  .log-details {
    max-width: 200px;
    word-break: break-word;
  }
}
