/* LINE-Style Design for Got Slip Service */
/* Inspired by LINE app's clean, friendly design */

/* LINE Color Palette */
:root {
  --line-green: #06C755;
  --line-green-dark: #05B04A;
  --line-green-light: #B8E986;
  --line-bg: #F7F7F7;
  --line-card-bg: #FFFFFF;
  --line-text: #333333;
  --line-text-secondary: #8B8B8B;
  --line-border: #E6E6E6;
  --line-shadow: rgba(0, 0, 0, 0.08);
  --line-shadow-hover: rgba(0, 0, 0, 0.12);
}

/* Body and Layout - LINE-style */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--line-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--line-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
  padding-bottom: 2rem;
}

/* LINE-style Navbar */
.navbar {
  background: linear-gradient(135deg, var(--line-green) 0%, var(--line-green-dark) 100%) !important;
  box-shadow: 0 2px 8px var(--line-shadow);
  border: none;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* LINE-style Cards */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--line-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background-color: var(--line-card-bg);
}

.card:hover {
  box-shadow: 0 8px 24px var(--line-shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid var(--line-border);
  background-color: var(--line-card-bg);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* LINE-style Buttons */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: -0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--line-green) 0%, var(--line-green-dark) 100%);
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--line-green-dark) 0%, #049842 100%);
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.4);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border: 2px solid var(--line-green);
  color: var(--line-green);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--line-green);
  color: white;
  transform: translateY(-1px);
}

.btn-sm {
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  border-radius: 14px;
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* LINE-style Badges */
.badge {
  font-weight: 600;
  padding: 0.5em 0.85em;
  border-radius: 8px;
  font-size: 0.85em;
  letter-spacing: -0.2px;
}

.bg-success {
  background-color: var(--line-green) !important;
}

.bg-primary {
  background-color: var(--line-green) !important;
}

/* LINE-style List Groups */
.list-group-item {
  border: 1px solid var(--line-border);
  border-radius: 12px !important;
  margin-bottom: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
  background-color: var(--line-card-bg);
}

.list-group-item:hover {
  background-color: #FAFAFA;
  box-shadow: 0 4px 12px var(--line-shadow);
  transform: translateX(4px);
}

.list-group-item-action {
  cursor: pointer;
}

/* LINE-style Tables */
.table {
  background-color: var(--line-card-bg);
  border-radius: 12px;
  overflow: hidden;
}

.table thead th {
  background-color: #F8F9FA;
  border-bottom: 2px solid var(--line-border);
  font-weight: 600;
  color: var(--line-text);
  padding: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  color: var(--line-text);
}

.table-hover tbody tr:hover {
  background-color: rgba(6, 199, 85, 0.05);
  cursor: pointer;
}

/* LINE-style Alerts */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 8px var(--line-shadow);
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: #E8F7EF;
  color: #05B04A;
  border-left: 4px solid var(--line-green);
}

.alert-info {
  background-color: #E3F2FD;
  color: #0277BD;
  border-left: 4px solid #03A9F4;
}

.alert-warning {
  background-color: #FFF8E1;
  color: #F57C00;
  border-left: 4px solid #FFA726;
}

.alert-danger {
  background-color: #FFEBEE;
  color: #C62828;
  border-left: 4px solid #EF5350;
}

/* Profile Picture Styling */
.rounded-circle {
  box-shadow: 0 2px 8px var(--line-shadow);
  border: 3px solid white;
}

/* Text Styling */
h1, h2, h3, h4, h5, h6 {
  color: var(--line-text);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.text-muted {
  color: var(--line-text-secondary) !important;
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}

/* Display Headings */
.display-1, .display-4, .display-5 {
  font-weight: 800;
  letter-spacing: -1px;
}

/* LINE-style Icons */
.bi {
  vertical-align: -0.125em;
}

/* Dashboard Specific Styles */
.text-center.mb-5.mt-5 {
  padding: 2rem 0;
}

.text-center .display-1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

/* Smooth Animations */
* {
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Link Styling */
a {
  color: var(--line-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--line-green-dark);
  text-decoration: none;
}

/* Code Blocks (for commands) */
code {
  background-color: #F5F5F5;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: #E91E63;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }

  .card {
    border-radius: 12px;
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1.25rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .table-responsive {
    font-size: 0.875rem;
    border-radius: 12px;
    overflow: hidden;
  }

  .navbar-brand {
    font-size: 1.125rem;
  }

  .list-group-item {
    padding: 1rem;
  }

  /* Improve touch targets */
  .list-group-item-action {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Better spacing on mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .col, [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--line-green-light);
  border-top-color: var(--line-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.card, .alert, .list-group-item {
  animation: fadeIn 0.4s ease-out;
}

/* Custom Scrollbar - LINE style */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--line-bg);
}

::-webkit-scrollbar-thumb {
  background: #CCCCCC;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--line-green);
}

/* Print Styles */
@media print {
  .no-print, .navbar, .footer, .btn, .alert {
    display: none !important;
  }

  body {
    background-color: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .table {
    font-size: 0.85rem;
  }

  @page {
    margin: 2cm;
  }
}

/* Footer Styling */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line-border);
  background-color: var(--line-card-bg);
  padding: 1.5rem 0;
}

/* Utility Classes */
.shadow-sm {
  box-shadow: 0 2px 8px var(--line-shadow) !important;
}

.shadow {
  box-shadow: 0 4px 12px var(--line-shadow) !important;
}

.shadow-lg {
  box-shadow: 0 8px 24px var(--line-shadow-hover) !important;
}

.rounded-lg {
  border-radius: 16px !important;
}

.rounded-md {
  border-radius: 12px !important;
}

/* Dashboard Statistics Cards */
.stat-card {
  background: linear-gradient(135deg, var(--line-green) 0%, var(--line-green-dark) 100%);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.stat-card h3 {
  color: white;
  opacity: 0.9;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-card .display-4 {
  color: white;
  font-weight: 800;
  font-size: 2.5rem;
  margin: 0;
}

/* LINE-style Breadcrumb Navigation */
.breadcrumb {
  background-color: transparent;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb-item {
  color: var(--line-text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--line-text-secondary);
  font-size: 1.2rem;
  padding: 0 0.5rem;
}

.breadcrumb-item a {
  color: var(--line-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--line-green-dark);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--line-text);
  font-weight: 600;
}

/* Profile Modal (Full Page Overlay) */
.profile-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.profile-modal-content {
  background: white;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.profile-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--line-text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.profile-modal-close:hover {
  background-color: var(--line-bg);
  color: var(--line-text);
}

.profile-menu {
  padding: 0 1rem 1.5rem;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  color: var(--line-text);
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.profile-menu-item:hover {
  background-color: var(--line-bg);
  color: var(--line-green);
  text-decoration: none;
  transform: translateX(4px);
}

.profile-menu-item i:first-child {
  font-size: 1.25rem;
  width: 32px;
  margin-right: 0.75rem;
}

.profile-menu-item span {
  flex: 1;
}

.profile-menu-item.text-danger:hover {
  color: #dc3545 !important;
}

/* Profile Picture Hover Effect */
.profile-pic-clickable {
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--line-shadow);
}

.profile-pic-clickable:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--line-shadow-hover);
}

/* Group Card Improvements */
.group-card {
  transition: all 0.2s ease;
}

.group-card:hover {
  background-color: #FAFAFA !important;
  transform: translateX(4px);
  box-shadow: 0 4px 12px var(--line-shadow) !important;
}

/* Clickable Table Rows for Mobile */
.table-hover tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(6, 199, 85, 0.05);
  transform: scale(1.01);
}

/* Hide View Details button on mobile, make whole row clickable */
@media (max-width: 768px) {
  .table-hover tbody tr .btn-primary {
    display: none;
  }

  .table-hover tbody tr {
    cursor: pointer;
  }
}

/* Ensure clickable rows work properly */
.table-row-link {
  cursor: pointer;
}
