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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  color: #2c3e50;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.header h1 {
  color: #667eea;
  font-size: 24px;
}

.user-info {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Login sahifa */
.login-box {
  background: white;
  border-radius: 15px;
  padding: 40px;
  max-width: 450px;
  margin: 100px auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.login-box h2 {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 20px;
  font-weight: normal;
}

.login-info {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
}

.login-info p {
  margin: 5px 0;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

/* Tugmalar */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-primary {
  background: #4a90e2;
  color: white;
  border: none;
}

.btn-primary:hover {
  background: #357abd;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

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

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

.btn-small {
  padding: 6px 12px;
  font-size: 14px;
}

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

.btn-danger:hover {
  background: #c82333;
}

/* Alert xabarlar */
.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

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

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

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* So'rovnoma bo'limlari */
.survey-section {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.survey-section h2 {
  color: #667eea;
  margin-bottom: 15px;
}

.info-text {
  color: #666;
  margin-bottom: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

/* Xodim kartasi */
.employee-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s;
}

.employee-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.employee-card.submitted {
  opacity: 0.7;
  background: #e9ecef;
}

.employee-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.employee-header h3 {
  color: #333;
  font-size: 20px;
}

.position-badge {
  background: #667eea;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.department {
  color: #666;
  font-size: 14px;
}

.submitted-badge {
  background: #28a745;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
}

/* Savollar */
.question-group {
  margin-bottom: 25px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.question-label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 12px;
  font-size: 16px;
}

.rating-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rating-option {
  cursor: pointer;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s;
  background: white;
}

.rating-option:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.rating-option input[type="radio"] {
  display: none;
}

.rating-option input[type="radio"]:checked + .star {
  color: #667eea;
  font-weight: bold;
}

.star {
  font-size: 18px;
  color: #999;
}

/* Admin panel */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  color: #666;
  font-size: 16px;
  margin-bottom: 10px;
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  color: #667eea;
}

.admin-section {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
  color: #667eea;
  margin-bottom: 20px;
}

/* Jadval */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.data-table th {
  background: #f8f9fa;
  color: #667eea;
  font-weight: 600;
}

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

/* Form inline */
.form-inline {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-inline .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.form-inline .full-width {
  flex: 100%;
}

/* Natijalar */
.employee-info-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.employee-info-card h2 {
  color: #667eea;
  margin-bottom: 15px;
}

.stats-inline {
  display: flex;
  gap: 30px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.stats-inline span {
  color: #666;
}

.result-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  border-left: 4px solid #667eea;
}

.result-card h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 18px;
}

.rating-result {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.avg-rating {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
}

.stars {
  font-size: 20px;
  color: #ffc107;
}

.stars-small {
  font-size: 14px;
  color: #ffc107;
  margin-left: 5px;
}

.response-count {
  color: #666;
  font-size: 14px;
}

.text-responses {
  margin-top: 15px;
}

.text-response-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 3px solid #667eea;
}

.text-response-item p {
  color: #333;
  margin: 0;
}

.no-data {
  color: #999;
  font-style: italic;
}

/* Home Page */
.home-page {
  background: white;
  border-radius: 15px;
  padding: 40px;
  margin: 50px auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.hero-section {
  text-align: center;
  margin-bottom: 50px;
}

.hero-section h1 {
  color: #667eea;
  font-size: 42px;
  margin-bottom: 15px;
  font-weight: 700;
}

.subtitle {
  color: #666;
  font-size: 18px;
  margin-top: 10px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.option-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  transition: all 0.3s;
  border: 2px solid #e0e0e0;
}

.option-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  border-color: #667eea;
}

.option-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.option-card h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 15px;
}

.option-card p {
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

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

.info-section {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 2px solid #e0e0e0;
}

.info-section h3 {
  color: #667eea;
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.info-item {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.info-item strong {
  color: #667eea;
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
}

.info-item p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.anonymous-info {
  margin-bottom: 25px;
}

/* Filter panel */
.filter-panel {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
}

.filter-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 15px;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 10px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

.filter-group input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background: white;
}

.filter-group select {
  width: 100%;
  padding: 12px 15px;
  padding-right: 35px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background: white;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.filter-group button {
  padding: 10px 15px;
}

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

.filter-buttons button {
  width: 100%;
}

.filter-results {
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

#no-results-message {
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .filter-panel {
    padding: 15px;
    border-radius: 8px;
  }

  .filter-row {
    flex-direction: column;
    gap: 15px;
  }

  .filter-group {
    min-width: 100%;
    flex: none;
  }

  .filter-group label {
    font-size: 15px;
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
    color: #2c3e50;
  }

  .filter-group input[type="text"] {
    font-size: 16px;
    padding: 14px 15px;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .filter-group select {
    font-size: 16px;
    padding: 14px 15px;
    padding-right: 40px;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    background-size: 14px;
    background-position: right 15px center;
    cursor: pointer;
  }

  .filter-buttons {
    flex-direction: row;
    gap: 10px;
  }

  .filter-buttons button {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
  }

  .filter-results {
    padding-top: 15px;
    font-size: 15px;
    text-align: center;
  }

  .container {
    padding: 15px;
  }

  .survey-section {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .filter-panel {
    padding: 12px;
  }

  .filter-group label {
    font-size: 14px;
  }

  .filter-group input[type="text"],
  .filter-group select {
    font-size: 16px;
    padding: 12px 15px;
    padding-right: 40px;
  }
}

/* Til tanlash komponenti */
.language-selector-top {
  background: white;
  padding: 15px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

.lang-switcher {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: #2c3e50;
  border: 2px solid #e0e0e0;
  transition: all 0.3s;
  background: white;
}

.lang-option:hover {
  border-color: #4a90e2;
  background: #f0f7ff;
  color: #4a90e2;
}

.lang-option.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.lang-option.active:hover {
  background: #357abd;
  border-color: #357abd;
}

.flag-icon {
  display: inline-flex;
  width: 20px;
  height: 15px;
  align-items: center;
  justify-content: center;
}

.flag-icon svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-links {
  margin-top: 20px;
  text-align: center;
}

.login-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
}

.login-links a:hover {
  text-decoration: underline;
}

.login-links p {
  margin: 10px 0;
}

/* Upload form */
.upload-form {
  margin-top: 20px;
}

.upload-form input[type="file"] {
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
}

.upload-form small {
  display: block;
  color: #666;
  margin-top: 5px;
  font-size: 14px;
}

/* Code block */
.code-block {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.code-block code {
  color: #d63384;
}

/* Responsive */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 15px;
  }

  .login-box {
    margin: 50px auto;
    padding: 30px 20px;
  }

  .form-inline {
    flex-direction: column;
  }

  .form-inline .form-group {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

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

  .home-page {
    padding: 20px;
    margin: 20px auto;
  }

  .hero-section h1 {
    font-size: 32px;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .option-card {
    padding: 30px 20px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Sidebar */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f5f7fa;
}

.admin-sidebar {
  width: 260px;
  background: #2c3e50;
  color: white;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 25px 20px;
  background: #1a252f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  color: white;
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: 600;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  background: #1a252f;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-lang-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-option-sidebar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #bdc3c7;
  font-size: 13px;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.lang-option-sidebar:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

.lang-option-sidebar.active {
  background: rgba(102, 126, 234, 0.2);
  color: white;
  border-color: #667eea;
}

.flag-icon-small {
  display: inline-flex;
  width: 16px;
  height: 12px;
  align-items: center;
  justify-content: center;
}

.flag-icon-small svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-username-only {
  font-size: 14px;
  color: white;
  font-weight: 500;
  display: block;
  text-align: center;
}

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

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

.sidebar-nav li {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #bdc3c7;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-left-color: #667eea;
}

.nav-link.active {
  background: rgba(102, 126, 234, 0.15);
  color: white;
  border-left-color: #667eea;
  font-weight: 500;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-text {
  font-size: 15px;
}

.logout-link {
  color: #e74c3c;
}

.logout-link:hover {
  background: rgba(231, 76, 60, 0.1);
  border-left-color: #e74c3c;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 20px;
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

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

.admin-header h1 {
  color: #2c3e50;
  font-size: 24px;
  margin: 0;
  font-weight: 600;
}

.admin-content {
  padding: 30px;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

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

  .admin-main {
    margin-left: 0;
  }

  .admin-content {
    padding: 20px 15px;
  }

  .sidebar-footer {
    position: relative;
    padding: 15px;
  }
}

/* Settings page styles */
.user-info-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row strong {
  color: #2c3e50;
  font-weight: 600;
}

.info-row span {
  color: #666;
}

.password-form {
  max-width: 500px;
  margin-top: 20px;
}
