﻿html {
  font-size: 14px;
}

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

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%);
  color: #111827;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Global, consistent look for all scaffolded views */
main {
  padding-top: 2rem;
  min-height: calc(100vh - 200px);
}

main h1, main .display-4 {
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 1rem;
}
main h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.5rem);
}

/* Modern Card Styles */
.card, .content-panel {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(238, 242, 247, 0.8);
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.08);
  position: relative;
  overflow: hidden;
}


.content-panel { 
  padding: 2rem; 
  background: linear-gradient(135deg, #ffffff, #f8faff);
}

.card-header {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-bottom: 1px solid rgba(238, 242, 247, 0.8);
  border-radius: 20px 20px 0 0 !important;
  padding: 1.5rem 2rem;
}

.card-body {
  padding: 2rem;
}

.card-footer {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-top: 1px solid rgba(238, 242, 247, 0.8);
  border-radius: 0 0 20px 20px !important;
  padding: 1.5rem 2rem;
}

.table {
  border-color: #eef2f7;
}
.table thead th {
  background: #f8fafc;
  color: #374151;
  font-weight: 700;
}
.table tbody tr:hover { background: #f9fbff; }
.table > :not(caption) > * > * { padding: .9rem 1rem; }
.table .actions { white-space: nowrap; }

/* Pagination */
.pagination .page-link { border-radius: 10px; margin: 0 .15rem; }
.pagination .page-item.active .page-link { background-color: #0d6efd; border-color: #0d6efd; }

/* Modern Form Styles */
.form-control, .form-select {
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-control:focus, .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15), 0 4px 20px rgba(13, 110, 253, 0.1);
  background: #ffffff;
}

.form-control:hover, .form-select:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-floating > .form-control {
  padding: 1.625rem 1rem 0.625rem;
}

.form-floating > label {
  color: #6b7280;
  font-weight: 500;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: #0d6efd;
  font-weight: 600;
}

.input-group-text {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 2px solid #e5e7eb;
  border-radius: 12px 0 0 12px;
  color: #6b7280;
  font-weight: 500;
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.input-group .form-control:focus {
  border-left: none;
}

.form-check-input {
  border-radius: 6px;
  border: 2px solid #d1d5db;
  width: 1.25rem;
  height: 1.25rem;
}

.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-label {
  color: #374151;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Validation States */
.is-valid {
  border-color: #20c997 !important;
  box-shadow: 0 0 0 0.2rem rgba(32, 201, 151, 0.15) !important;
}

.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.15) !important;
}

.valid-feedback {
  color: #20c997;
  font-weight: 500;
  font-size: 0.875rem;
}

.invalid-feedback {
  color: #ef4444;
  font-weight: 500;
  font-size: 0.875rem;
}

/* Modern Button Styles */
.btn { 
  border-radius: 12px; 
  font-weight: 500;
  border: none;
  position: relative;
  overflow: hidden;
}


.btn-primary { 
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover { 
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

.btn-secondary { 
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
  box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover { 
  background: linear-gradient(135deg, #64748b, #475569);
}

.btn-outline-primary {
  background: transparent;
  color: #0d6efd;
  border: 2px solid #0d6efd;
  position: relative;
  overflow: hidden;
}

.btn-outline-primary:hover {
  color: #0d6efd;
  background: transparent;
}

.btn-outline-secondary { 
  color: #475569; 
  border: 2px solid #cbd5e1;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.btn-outline-secondary:hover { 
  background: transparent;
  color: #475569;
}

.btn-outline-danger { 
  border: 2px solid #ef4444; 
  color: #ef4444;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.btn-outline-danger:hover { 
  background: transparent;
  color: #ef4444;
}

.btn-success {
  background: linear-gradient(135deg, #20c997, #1ba085);
  color: #fff;
  box-shadow: 0 4px 15px rgba(32, 201, 151, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #20c997, #1ba085);
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #ffc107, #e0a800);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: #fff;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

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

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

/* Spacing helpers used by scaffolded pages */
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1rem; }
.page-head .lead { color:#6b7280; }

/* Alerts */
.alert { border-radius: 12px; }

/* Forms in panels */
.form-panel { padding: 1.25rem; background:#fff; border:1px solid #eef2f7; border-radius:16px; box-shadow:0 10px 24px rgba(2,6,23,.06); }
.form-panel .form-label { font-weight: 600; color:#374151; }

/* Badges / tags */
.badge-soft { 
  background: linear-gradient(135deg, #eef2ff, #e0e7ff); 
  color: #3730a3; 
  border-radius: 999px; 
  padding: 0.4rem 0.7rem; 
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-soft:hover {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

/* Subtle Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Enhanced focus states */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Improved selection */
::selection {
  background: rgba(13, 110, 253, 0.2);
  color: #111827;
}

::-moz-selection {
  background: rgba(13, 110, 253, 0.2);
  color: #111827;
}

/* Sticky Footer Styles */
.footer-sticky {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  padding: 0.75rem 0;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  flex: 1;
}

.footer-right {
  flex: 1;
  text-align: right;
}

.copyright {
  color: #6b7280;
  font-size: 0.75rem;
  margin: 0;
}

.developer-info {
  color: #374151;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.linkedin-icon {
  color: #0077b5;
  text-decoration: none;
  font-size: 0.875rem;
}

.linkedin-icon:hover {
  color: #005885;
  text-decoration: none;
}

/* Responsive Footer */
.footer-modern {
    background-color: #f9fafb; 
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
}

    .footer-modern a {
        color: #0a66c2;
    }

        .footer-modern a:hover {
            text-decoration: underline;
        }