/**
 * GTIS Platform Styles
 * Mobile-First Modern Design with Dark Purple Theme
 */

:root {
  /* Dark Purple Theme */
  --primary: #4c1d95;
  --primary-light: #6d28d9;
  --primary-dark: #3b0764;
  --secondary: #7c3aed;
  --accent: #a78bfa;

  /* Neutral Colors */
  --dark: #1f2937;
  --light: #f9fafb;
  --white: #ffffff;

  /* Status Colors */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Gray Scale */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Layout */
  --sidebar-width: 280px;
  --topbar-height: 64px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Login Page - Mobile First */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.login-box {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 2.5rem 2rem;
  text-align: center;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 0.95rem;
  opacity: 0.95;
  font-weight: 300;
}

.login-form {
  padding: 2rem;
}

.login-footer {
  padding: 1.5rem 2rem;
  background: var(--gray-50);
  text-align: center;
  border-top: 1px solid var(--gray-200);
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.login-footer a:hover {
  color: var(--primary-light);
}

/* Layout - Mobile First */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar {
  width: 100%;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  position: fixed;
  top: 0;
  left: -100%;
  height: 100vh;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar.show {
  left: 0;
}

.sidebar-header {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.user-role {
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 300;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0;
}

.sidebar-menu li {
  margin: 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent);
  color: var(--white);
}

.sidebar-menu i {
  width: 24px;
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.user-info {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.9;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-left h2 {
  font-size: 1.25rem;
  color: var(--dark);
  font-weight: 700;
  display: none;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.9rem;
  display: none;
}

.content-area {
  flex: 1;
  padding: 1rem;
}

/* Forms - Mobile First */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 29, 149, 0.1);
}

.form-control:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.6;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  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='%234B5563' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Buttons - Mobile First */
.btn {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(76, 29, 149, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 29, 149, 0.4);
}

.btn-secondary {
  background: var(--gray-600);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--gray-700);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-info {
  background: var(--info);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Alerts - Mobile First */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.25rem;
  position: relative;
  border-left: 4px solid;
  font-size: 0.95rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left-color: var(--success);
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-left-color: var(--danger);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left-color: var(--warning);
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left-color: var(--info);
}

.alert-dismissible {
  padding-right: 3rem;
}

.alert .close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
}

.alert .close:hover {
  opacity: 1;
}

/* Cards - Mobile First */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-header h3 {
  font-size: 1.25rem;
  color: var(--dark);
  font-weight: 700;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* Tables - Mobile First */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: -1.5rem;
  padding: 1.5rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.9rem;
}

.table thead {
  background: var(--gray-50);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* Badges - Mobile First */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary);
  color: var(--white);
}

.badge-purple {
  background: var(--secondary);
  color: var(--white);
}

.badge-success {
  background: var(--success);
  color: var(--white);
}

.badge-danger {
  background: var(--danger);
  color: var(--white);
}

.badge-warning {
  background: var(--warning);
  color: var(--white);
}

.badge-info {
  background: var(--info);
  color: var(--white);
}

.badge-secondary {
  background: var(--gray-500);
  color: var(--white);
}

/* Stats Cards - Mobile First */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  flex-shrink: 0;
}

.stat-icon.purple {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.stat-icon.success {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-icon.danger {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

.stat-icon.info {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.stat-icon.warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-content h4 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-content p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

/* Pagination - Mobile First */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.875rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  transition: var(--transition);
  min-width: 40px;
  text-align: center;
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Modal - Mobile First */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.show {
  display: flex;
}

.modal-dialog {
  background: var(--white);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-muted {
  color: var(--gray-600);
}
.text-primary {
  color: var(--primary);
}
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}

.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}

.p-0 {
  padding: 0;
}
.p-1 {
  padding: 0.5rem;
}
.p-2 {
  padding: 1rem;
}
.p-3 {
  padding: 1.5rem;
}

.d-flex {
  display: flex;
}
.align-items-center {
  align-items: center;
}
.justify-content-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}

/* Footer Styles */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-top: auto;
}

.footer p {
  margin: 0;
}

/* Job Listing Styles - Frontend */
.job-listing-page {
  min-height: 100vh;
  background: var(--gray-50);
}

.job-listing-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 3rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.job-listing-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.job-listing-header p {
  font-size: 1.1rem;
  opacity: 0.95;
}

.job-listing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.job-filters {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.job-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 29, 149, 0.15);
}

.job-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.job-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.job-card-meta i {
  color: var(--primary);
  margin-right: 0.25rem;
}

.job-card-description {
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.job-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.job-details-page {
  min-height: 100vh;
  background: var(--gray-50);
}

.job-details-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.job-details-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.job-details-header {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.job-details-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.job-details-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.job-details-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-700);
}

.job-details-meta-item i {
  color: var(--primary);
  width: 20px;
}

.job-details-content {
  line-height: 1.8;
  color: var(--gray-800);
}

.job-details-content h3 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.job-details-content ul,
.job-details-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.job-details-content li {
  margin-bottom: 0.5rem;
}

.apply-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
}

.apply-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.apply-section p {
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
  .content-area {
    padding: 1.5rem;
  }

  .topbar-left h2 {
    display: block;
  }

  .user-name {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .form-row {
    flex-direction: row;
  }

  .card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }

  .job-listing-header h1 {
    font-size: 2.5rem;
  }

  .job-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .job-card-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .job-details-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
  .sidebar {
    width: var(--sidebar-width);
    left: 0;
    position: fixed;
  }

  .sidebar-toggle {
    display: none;
  }

  .main-content {
    margin-left: var(--sidebar-width);
  }

  .content-area {
    padding: 2rem;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .topbar {
    padding: 0 2rem;
  }

  .job-listing-header {
    padding: 4rem 2rem;
  }

  .job-listing-container {
    padding: 3rem 2rem;
  }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
  .content-area {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .topbar,
  .btn,
  .alert {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
