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 rgba(20, 169, 184, 0.45);
}

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

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #f6f9fb 0%, #e6eff3 100%);
  min-height: 100vh;
}

/* Modern Card Styles */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Modern Button Styles */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  box-shadow: 0 4px 15px rgba(20, 169, 184, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0E7490 0%, #14A9B8 100%);
  box-shadow: 0 6px 20px rgba(20, 169, 184, 0.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #E5484D 0%, #C93338 100%);
  box-shadow: 0 4px 15px rgba(201, 51, 56, 0.4);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #C93338 0%, #E5484D 100%);
  box-shadow: 0 6px 20px rgba(201, 51, 56, 0.6);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  box-shadow: 0 4px 15px rgba(20, 169, 184, 0.4);
  border: none;
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #0E7490 0%, #14A9B8 100%);
  box-shadow: 0 6px 20px rgba(20, 169, 184, 0.6);
  transform: translateY(-2px);
  color: white;
}

.btn-pastel-green {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(20, 169, 184, 0.45);
}

.btn-pastel-green:hover,
.btn-pastel-green:focus {
  background: linear-gradient(135deg, #0E7490 0%, #14A9B8 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 169, 184, 0.55);
}

.btn-pastel-green .plus-icon {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

/* Modern Form Controls */
.form-control, .form-select {
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  padding: 0.625rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #14A9B8;
  box-shadow: 0 0 0 0.2rem rgba(20, 169, 184, 0.25);
  outline: none;
}

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

/* Modern Table Styles */
.table {
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: white;
  color: #333;
  font-weight: 600;
  border: none;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #dee2e6;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
  transform: scale(1.01);
}

.table-bordered {
  border: none;
}

.table-bordered td, .table-bordered th {
  border: 1px solid #e9ecef;
}

/* Modern Alert Styles */
.alert {
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.25rem;
}

.alert-info {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
  color: #00695c;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
}

.alert-danger {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
}

.alert-success {
  background: linear-gradient(135deg, #e6f6f7 0%, #c9ecef 100%);
  color: #0E7490;
}

/* Modern Input Group */
.input-group .form-control {
  border-radius: 8px 0 0 8px;
}

.input-group .btn {
  border-radius: 0 8px 8px 0;
}

/* Smooth Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Professional Shadows */
.shadow-sm {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* Currency helpers */
.currency-field,
.currency-field-sm {
  position: relative;
  width: 100%;
}

.currency-field input,
.currency-field-sm input {
  padding-left: 2rem;
}

.currency-prefix {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  line-height: 1;
}

/* Unified modal styling */
.custom-modal .modal-dialog {
  max-width: 420px;
}

.custom-modal .modal-content {
  border-radius: 18px;
  border: none;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.custom-modal .modal-header {
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  align-items: center;
}

.custom-modal .modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.custom-modal .modal-body {
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.custom-modal .modal-body .modal-icon {
  font-size: 3.25rem;
  margin-bottom: 1rem;
}

.custom-modal .modal-footer {
  border-top: none;
  padding: 1.25rem;
  justify-content: center;
  gap: 0.75rem;
}

.custom-modal .btn {
  min-width: 120px;
  border-radius: 10px;
}

.modal-header-success {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  color: #fff;
}

.modal-header-danger {
  background: linear-gradient(135deg, #E5484D 0%, #C93338 100%);
  color: #fff;
}

.modal-header-primary {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  color: #fff;
}

.modal-header-info {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  color: #fff;
}

.custom-modal .btn-close.btn-close-white {
  opacity: 0.8;
}

.custom-modal .btn-close.btn-close-white:hover {
  opacity: 1;
}

.shadow-lg {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Modern Badge */
.badge {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
}

/* Professional Spacing */
.mt-4 {
  margin-top: 2rem !important;
}

.mb-4 {
  margin-bottom: 2rem !important;
}

.p-4 {
  padding: 2rem !important;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0E7490 0%, #14A9B8 100%);
}

/* ===== Sypercom theme: every Bootstrap colour follows the website palette =====
   turquoise #14A9B8 → deep #0E7490, ink #10283A, muted #55697B, one red, one amber. */
:root {
  --sp-accent: #14A9B8;
  --sp-accent-deep: #0E7490;
  --sp-ink: #10283A;
  --sp-muted: #55697B;
  --sp-red: #D63A3F;
  --sp-amber: #E0A43A;
  --sp-gradient: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%);
  --sp-gradient-hover: linear-gradient(135deg, #0E7490 0%, #14A9B8 100%);
  --bs-primary: #14A9B8;
  --bs-primary-rgb: 20, 169, 184;
  --bs-success: #14A9B8;
  --bs-success-rgb: 20, 169, 184;
  --bs-info: #0E7490;
  --bs-info-rgb: 14, 116, 144;
  --bs-warning: #E0A43A;
  --bs-warning-rgb: 224, 164, 58;
  --bs-danger: #D63A3F;
  --bs-danger-rgb: 214, 58, 63;
  --bs-link-color: #0E7490;
  --bs-link-color-rgb: 14, 116, 144;
  --bs-link-hover-color: #14A9B8;
  --bs-link-hover-color-rgb: 20, 169, 184;
  --bs-primary-text-emphasis: #0E7490;
  --bs-primary-bg-subtle: #e3f5f6;
  --bs-primary-border-subtle: #b5e3e8;
  --bs-success-text-emphasis: #0E7490;
  --bs-success-bg-subtle: #e3f5f6;
  --bs-info-text-emphasis: #0E7490;
  --bs-info-bg-subtle: #e3f5f6;
  --bs-focus-ring-color: rgba(20, 169, 184, 0.3);
}

/* Filled buttons: primary / success / info share the turquoise gradient */
.btn-primary, .btn-success, .btn-info {
  background: var(--sp-gradient);
  border: none;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(20, 169, 184, 0.28);
}
.btn-primary:hover, .btn-success:hover, .btn-info:hover,
.btn-primary:focus, .btn-success:focus, .btn-info:focus,
.btn-primary:active, .btn-success:active, .btn-info:active {
  background: var(--sp-gradient-hover) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(20, 169, 184, 0.38);
}
.btn-warning {
  background: linear-gradient(135deg, #E9B44F 0%, #D18F22 100%);
  border: none;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(224, 164, 58, 0.3);
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
  background: linear-gradient(135deg, #D18F22 0%, #E9B44F 100%) !important;
  color: #fff !important;
}
.btn-danger {
  background: linear-gradient(135deg, #E5484D 0%, #C93338 100%);
  border: none;
  color: #fff !important;
}
.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
  background: linear-gradient(135deg, #C93338 0%, #E5484D 100%) !important;
  color: #fff !important;
}
.btn-secondary {
  background: #eef3f6;
  border: 1px solid #d3dee5;
  color: var(--sp-ink) !important;
  box-shadow: none;
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
  background: #e1eaef !important;
  border-color: #c3d1da !important;
  color: var(--sp-ink) !important;
}

/* Outline buttons */
.btn-outline-primary, .btn-outline-info, .btn-outline-success {
  background: #fff;
  border: 1px solid #9fdbe2;
  color: var(--sp-accent-deep);
}
.btn-outline-primary:hover, .btn-outline-info:hover, .btn-outline-success:hover,
.btn-outline-primary:active, .btn-outline-info:active, .btn-outline-success:active {
  background: var(--sp-accent) !important;
  border-color: var(--sp-accent) !important;
  color: #fff !important;
}
.btn-outline-secondary {
  background: #fff;
  border: 1px solid #d3dee5;
  color: var(--sp-muted);
}
.btn-outline-secondary:hover, .btn-outline-secondary:active {
  background: #eef3f6 !important;
  border-color: #c3d1da !important;
  color: var(--sp-ink) !important;
}
.btn-outline-danger {
  background: #fff;
  border: 1px solid #f0b7b9;
  color: var(--sp-red);
}
.btn-outline-danger:hover, .btn-outline-danger:active {
  background: var(--sp-red) !important;
  border-color: var(--sp-red) !important;
  color: #fff !important;
}

/* Text, backgrounds, badges, progress */
.text-primary, .text-success, .text-info { color: var(--sp-accent) !important; }
.text-warning { color: var(--sp-amber) !important; }
.text-danger { color: var(--sp-red) !important; }
.bg-primary, .bg-success, .bg-info, .progress-bar { background: var(--sp-gradient) !important; }
.bg-primary-subtle { background-color: #e3f5f6 !important; }
.text-primary-emphasis { color: var(--sp-accent-deep) !important; }
.spinner-border.text-primary { color: var(--sp-accent) !important; }
a { color: var(--sp-accent-deep); }
a:hover { color: var(--sp-accent); }
a.btn { text-decoration: none; }

/* Modal headers: success / primary / info = theme, danger = red, warning = amber */
.modal-header-success, .modal-header-primary, .modal-header-info { background: var(--sp-gradient); color: #fff; }
.modal-header-danger { background: linear-gradient(135deg, #E5484D 0%, #C93338 100%); color: #fff; }

/* Alerts */
.alert-info, .alert-success { background: #e8f6f8; color: var(--sp-accent-deep); border: 1px solid #c4e8ec; }

/* Form controls: turquoise focus ring and checked state */
.form-control:focus, .form-select:focus { border-color: var(--sp-accent); box-shadow: 0 0 0 0.2rem rgba(20, 169, 184, 0.18); }
.form-check-input:checked { background-color: var(--sp-accent); border-color: var(--sp-accent); }
.form-check-input:focus { border-color: var(--sp-accent); box-shadow: 0 0 0 0.2rem rgba(20, 169, 184, 0.2); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--sp-gradient); color: #fff; }
.page-link { color: var(--sp-accent-deep); }
.page-item.active .page-link { background-color: var(--sp-accent); border-color: var(--sp-accent); }

/* Header action button on turquoise card headers (Proje Ekle, like Kullanıcılar → Personel Ekle) */
.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
}
.card-action-btn:hover, .card-action-btn:focus { background: #fff; color: #0E7490; border-color: #fff; }

/* Form windows (Proje Ekle) */
.form-modal .modal-content { border: 0; border-radius: 20px; overflow: hidden; }
.form-modal .modal-header { background: linear-gradient(135deg, #14A9B8 0%, #0E7490 100%); color: #fff; border: 0; padding: 18px 24px; }
.form-modal .modal-body { padding: 22px 24px 8px; }
.form-modal .modal-footer { border: 0; padding: 8px 24px 22px; }
.form-modal .form-label { font-size: 13px; font-weight: 600; color: #4f5c66; margin-bottom: 6px; }

/* List pages (Projeler, Planlamalar): count badge in the card header + one horizontal search/sort bar */
.list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 600;
}
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 16px;
  padding: 18px 24px;
  background: #f7fafb;
  border-bottom: 1px solid #e3e8ee;
}
.list-toolbar__field { flex: 1 1 160px; min-width: 0; }
.list-toolbar__field--narrow { flex: 0 1 150px; }
.list-toolbar__field--wide { flex: 2 1 220px; }
.list-toolbar__field--order { flex: 1 1 200px; }
.list-toolbar .form-label { font-size: 13px; font-weight: 600; color: #4f5c66; margin-bottom: 6px; }
.list-toolbar .form-control,
.list-toolbar .form-select { height: 42px; padding-top: 0; padding-bottom: 0; line-height: 38px; }
.list-toolbar .form-select { padding-right: 2.25rem; text-overflow: ellipsis; }
.list-toolbar__search { position: relative; }
.list-toolbar__search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8a9aa8; pointer-events: none; }
.list-toolbar__search .form-control { padding-left: 38px; }
.list-toolbar__actions { display: flex; gap: 8px; }
.list-toolbar__actions .btn { height: 42px; display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width: 767.98px) {
  .list-toolbar { padding: 16px; }
  .list-toolbar__field, .list-toolbar__field--narrow, .list-toolbar__field--wide, .list-toolbar__field--order { flex: 1 1 100%; }
  .list-toolbar__actions { flex: 1 1 100%; }
  .list-toolbar__actions .btn-primary { flex: 1; justify-content: center; }
}

/* ---------- Phones: shared layout fixes for every page ---------- */
@media (max-width: 767.98px) {
  .main-content .container-fluid { padding-left: 0; padding-right: 0; }
  /* Card titles and their buttons wrap instead of being cut off on the right */
  .main-content .card-header { flex-wrap: wrap !important; gap: 10px !important; padding: 14px 16px; }
  .main-content .card-header > * { min-width: 0; max-width: 100%; }
  .main-content .card-header h4, .main-content .card-header h5 { font-size: 1.12rem; }
  .main-content .card-header .d-flex { flex-wrap: wrap; }
  .card-action-btn { padding: 6px 12px; font-size: 0.9rem; }
  .main-content .card-body { padding-left: 14px; padding-right: 14px; }
  .main-content .card-body.px-0 { padding-left: 0; padding-right: 0; }
  .main-content .table { font-size: 0.9rem; }
  .main-content .btn-group { flex-wrap: wrap; }
  /* Windows (modals) use the whole width */
  .modal-dialog { margin: 0.5rem auto; max-width: calc(100vw - 1rem); }
  .modal-footer { flex-wrap: wrap; }
  .settings-toast { left: 12px !important; right: 12px !important; top: 72px !important; max-width: none !important; }
}
