/* ========================================
   PiA Group IT Destek - Modern Theme
   ======================================== */

:root {
  /* Primary Colors */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  
  /* Neutral Colors */
  --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;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Base */
* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html { font-size: 15px; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 600;
  line-height: 1.3;
}

.text-muted { color: var(--gray-500) !important; }

/* ========================================
   Navbar
   ======================================== */
.navbar-main {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 0;
}

.navbar-main .navbar-brand {
  font-weight: 700;
  color: var(--gray-900);
}

.navbar-main .navbar-brand img {
  height: 32px;
}

.navbar-main .nav-link {
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.navbar-main .nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-lg {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--gray-100);
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.card-body {
  padding: 1.25rem;
}

.card-hover:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ========================================
   Forms
   ======================================== */
.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.form-control, .form-select {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
  color: var(--gray-400);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ========================================
   Page Layout
   ======================================== */
.page-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.page-header .breadcrumb {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.page-header .breadcrumb-item a {
  color: var(--gray-500);
  text-decoration: none;
}

.page-header .breadcrumb-item a:hover {
  color: var(--primary);
}

.page-header .breadcrumb-item.active {
  color: var(--gray-700);
}

.page-content {
  flex: 1;
  padding: 1.5rem 0;
}

/* ========================================
   Home Page
   ======================================== */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
}

.hero p {
  font-size: 1.0625rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

.action-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
}

.action-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.action-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.action-card .icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.action-card .icon.success {
  background: #d1fae5;
  color: var(--success);
}

.action-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.action-card p {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.feature-item i {
  color: var(--success);
}

/* ========================================
   Ticket Forms
   ======================================== */
.form-card {
  max-width: 600px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ========================================
   Ticket Details
   ======================================== */
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.ticket-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.ticket-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.ticket-id {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Comments */
.comment {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.comment-avatar.staff {
  background: var(--primary);
  color: white;
}

.comment-avatar.user {
  background: var(--gray-200);
  color: var(--gray-600);
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.comment-author {
  font-weight: 600;
  font-size: 0.875rem;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.comment-body {
  background: var(--gray-50);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.comment-body.staff {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
}

/* ========================================
   Badges
   ======================================== */
.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Status badges */
.badge-open { background: #fef2f2; color: #dc2626; }
.badge-inprogress { background: #fef3c7; color: #d97706; }
.badge-onhold { background: var(--gray-100); color: var(--gray-600); }
.badge-resolved { background: #d1fae5; color: #059669; }
.badge-closed { background: var(--gray-200); color: var(--gray-700); }

/* Priority badges */
.badge-low { background: var(--gray-100); color: var(--gray-600); }
.badge-normal { background: #dbeafe; color: #2563eb; }
.badge-high { background: #fef3c7; color: #d97706; }
.badge-critical { background: #fef2f2; color: #dc2626; }

/* ========================================
   Success Page
   ======================================== */
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d1fae5;
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.tracking-number {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  display: inline-block;
}

/* ========================================
   Footer
   ======================================== */
.footer-main {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 1rem 0;
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ========================================
   Utilities
   ======================================== */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 1rem 0;
}

.text-primary { color: var(--primary) !important; }
.bg-primary-light { background: var(--primary-light) !important; }

/* Focus states */
.btn:focus, .form-control:focus, .form-select:focus {
  outline: none;
}

/* Alerts */
.alert {
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: none;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-danger {
  background: #fef2f2;
  color: #dc2626;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Responsive container */
.container {
  max-width: 1140px;
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

/* Fix Bootstrap overrides */
html { position: relative; min-height: 100%; }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--gray-400);
}