/* Hidroteknik Personel Portalı - Ana Stil Dosyası */

:root {
  --primary-color: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #059669;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --success-color: #10b981;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
}

.header-logo img {
  height: 45px;
  width: auto;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-user span {
  font-weight: 500;
  color: var(--text-primary);
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  color: var(--text-primary);
}

.user-dropdown-toggle:hover {
  background: var(--border-color);
}

.user-dropdown-toggle i {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.user-dropdown.open .user-dropdown-toggle i {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1000;
}

.user-dropdown.open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-menu a,
.user-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background: var(--bg-color);
}

.user-dropdown-menu a:first-child,
.user-dropdown-menu button:first-child {
  border-radius: 8px 8px 0 0;
}

.user-dropdown-menu a:last-child,
.user-dropdown-menu button:last-child {
  border-radius: 0 0 8px 8px;
}

.user-dropdown-menu .divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.25rem 0;
}

.user-dropdown-menu .logout-btn {
  color: var(--danger-color);
}

.user-dropdown-menu .logout-btn:hover {
  background: #fee2e2;
}

@media (max-width: 768px) {
  .user-dropdown-toggle span {
    display: none;
  }
  
  .user-dropdown-toggle {
    padding: 0.5rem;
  }
  
  .user-dropdown-toggle i:first-child {
    font-size: 1.25rem;
  }
  
  .user-dropdown-menu {
    right: 0;
    min-width: 180px;
  }
}

.btn-logout {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-logout:hover {
  background: var(--primary-dark);
}

/* Admin Button */
.btn-admin {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-admin:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
}

.btn-admin i {
  font-size: 0.875rem;
}

/* Header Title */
.header-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .header-title {
    display: none;
  }
  
  .btn-admin {
    padding: 0.5rem;
  }
  
  .btn-admin span {
    display: none;
  }
}

/* Layout */
.container {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 0;
  box-shadow: var(--shadow);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin: 0.25rem 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
  background: var(--bg-color);
  border-left-color: var(--primary-color);
  color: var(--primary-color);
}

.sidebar-menu a.active {
  background: var(--bg-color);
  border-left-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 500;
}

.sidebar-menu a i {
  margin-right: 0.75rem;
  width: 20px;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-secondary {
  background: var(--text-secondary);
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.table thead {
  background: var(--bg-color);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr:hover {
  background: var(--bg-color);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-important {
  background: #fef2f2;
  color: #dc2626;
  font-weight: 600;
}

.badge-secondary {
  background: #e5e7eb;
  color: #374151;
}

/* Announcements */
.announcement-item {
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary-color);
  background: var(--card-bg);
  border-radius: 6px;
}

.announcement-item.important {
  border-left-color: var(--danger-color);
  background: #fef2f2;
}

.announcement-item h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.announcement-item p {
  color: var(--text-secondary);
  margin: 0;
}

/* Birthday Cards */
.birthday-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.birthday-card .icon {
  font-size: 2rem;
  margin-right: 1rem;
}

.birthday-card .info {
  flex: 1;
}

.birthday-card .name {
  font-weight: 600;
  color: var(--text-primary);
}

.birthday-card .date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Education Cards */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.education-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.education-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.education-card.completed {
  border-color: var(--success-color);
  background: #f0fdf4;
}

.education-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.education-card-icon {
  font-size: 2rem;
  margin-right: 1rem;
}

.education-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.education-card-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.education-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Loading Spinner */
.loading-spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 1000;
  border-left: 4px solid var(--primary-color);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left-color: var(--success-color);
}

.toast-danger {
  border-left-color: var(--danger-color);
}

.toast-warning {
  border-left-color: var(--warning-color);
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.login-card p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -250px;
    top: 70px;
    height: calc(100vh - 70px);
    z-index: 100;
    transition: left 0.3s;
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    padding: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .header h1 {
    font-size: 1.25rem;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }

  .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-right {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Footer */
.footer {
  background: #f3f4f6;
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-left {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-right a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-right a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Zimmet Cards */
.zimmet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.zimmet-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.zimmet-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.zimmet-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.zimmet-icon {
  font-size: 2rem;
  line-height: 1;
}

.zimmet-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  flex: 1;
}

.zimmet-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.zimmet-seri {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 0;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-color);
  color: var(--text-primary);
}

/* Table Zebra Striping */
.table tbody tr:nth-child(even) {
  background: #f9fafb;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.empty-state-subtext {
  font-size: 0.875rem;
}

/* Filter Row */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 8px;
}

.filter-row .form-group {
  min-width: 180px;
}

/* Table Container (horizontal scroll for mobile) */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Zimmet Card Additional Styles */
.zimmet-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.zimmet-card-content {
  flex: 1;
}

.zimmet-card-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.zimmet-card-type {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.zimmet-card-serial {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.zimmet-card-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.zimmet-card-date i {
  margin-right: 0.25rem;
}

/* Mobile responsive for filter row */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }
  
  .filter-row .form-group {
    width: 100%;
    min-width: unset;
  }
  
  .btn {
    width: 100%;
  }
  
  .zimmet-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Menu Toggle Color Fix */
.mobile-menu-toggle {
  color: var(--text-primary);
}

