/* ================================================
   Modern Personel Seçim Ekranı - Premium Design
   ================================================ */

:root {
  /* Tema Renkleri - Turuncu/Kırmızı */
  --staff-primary: #ff6348;
  --staff-primary-dark: #e55039;
  --staff-primary-light: #ff8a75;
  --staff-secondary: #ff6247;
  --staff-accent: #ff4757;
  --staff-success: #10b981;
  --staff-warning: #f59e0b;
  --staff-danger: #ef4444;

  /* Neutrals */
  --staff-dark: #2c3e50;
  --staff-gray: #64748b;
  --staff-gray-light: #cbd5e1;
  --staff-light: #f8fafc;
  --staff-white: #ffffff;

  /* Gradients */
  --staff-gradient-primary: linear-gradient(135deg, #ff6348 0%, #ff8a75 100%);
  --staff-gradient-secondary: linear-gradient(135deg, #ff6247 0%, #fe6447 100%);
  --staff-gradient-success: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  --staff-gradient-glass: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.85) 100%
  );

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glass: 0 8px 32px 0 rgba(255, 99, 72, 0.15);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ================================================
   Container & Layout
   ================================================ */

.staff-selection-container {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--staff-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  overflow: hidden;
  z-index: 9999;
}

.staff-selection-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(255, 99, 72, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 138, 117, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 71, 87, 0.1) 0%,
      transparent 50%
    );
  animation: morphingBackground 20s ease-in-out infinite alternate;
}

@keyframes morphingBackground {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-10%, -10%) scale(1.1);
  }
}

/* Branding - Logo ve Başlık */
.staff-selection-branding {
  position: fixed;
  top: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  text-align: center;
  color: white;
  padding: var(--space-lg);
  animation: fadeInDown 0.8s ease-out 0.3s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.staff-selection-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.staff-selection-logo-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  animation: floatingIcon 3s ease-in-out infinite;
}

@keyframes floatingIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.staff-selection-logo-icon:hover {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.staff-selection-logo-text {
  font-size: 48px;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.staff-selection-tagline {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ================================================
   Personel Listesi - Modern Cards (Wrapper Dışında)
   ================================================ */

.staff-list {
  position: fixed;
  left: var(--space-xl);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  z-index: 10000;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: var(--space-sm);
}

.staff-list::-webkit-scrollbar {
  width: 6px;
}

.staff-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

.staff-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.staff-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.staff-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 240px;
  animation: slideInLeft 0.6s ease-out both;
  animation-delay: calc(var(--item-index, 0) * 0.1s);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.staff-item:nth-child(1) {
  --item-index: 0;
}
.staff-item:nth-child(2) {
  --item-index: 1;
}
.staff-item:nth-child(3) {
  --item-index: 2;
}
.staff-item:nth-child(4) {
  --item-index: 3;
}
.staff-item:nth-child(5) {
  --item-index: 4;
}

.staff-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.staff-item:hover::before {
  left: 100%;
}

.staff-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.staff-item.active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--staff-primary);
  transform: translateX(12px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.staff-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--staff-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.staff-item.active .avatar {
  background: var(--staff-gradient-primary);
  color: white;
  border-color: var(--staff-primary);
  transform: rotate(5deg) scale(1.1);
}

.staff-item .name {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.staff-item.active .name {
  color: var(--staff-primary);
  text-shadow: none;
}

/* ================================================
   Numpad - Modern Glassmorphism Design
   ================================================ */

.numpad-container {
  position: fixed;
  left: 50%;
  bottom: var(--space-xl);
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glass);
  z-index: 10000;
  animation: slideInUp 0.8s ease-out 0.5s both;
}

.pin-input-inline {
  margin-bottom: var(--space-lg);
}

.pin-input-overlay-field {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 4px;
  color: var(--staff-primary);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.pin-input-overlay-field:focus {
  border-color: white;
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

.pin-input-overlay-field::placeholder {
  color: var(--staff-gray-light);
  letter-spacing: normal;
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 360px;
}

.numpad-key {
  width: 100px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--staff-primary);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.staff-selection-visual-overlay .numpad-key::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 99, 72, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.staff-selection-visual-overlay .numpad-key:hover::before {
  width: 200%;
  height: 200%;
}

.staff-selection-visual-overlay .numpad-key:hover {
  background: white;
  border-color: white;
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
  color: var(--staff-primary-dark);
}

.staff-selection-visual-overlay .numpad-key:active {
  transform: translateY(-2px) scale(1);
  box-shadow: var(--shadow-md);
}

.staff-selection-visual-overlay .numpad-key.primary {
  background: var(--staff-gradient-success);
  color: white;
  border-color: transparent;
  grid-column: span 1;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.staff-selection-visual-overlay .numpad-key.primary::before {
  background: rgba(255, 255, 255, 0.2);
}

.staff-selection-visual-overlay .numpad-key.primary:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.staff-selection-visual-overlay .numpad-key.function {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: white;
  border-color: transparent;
  font-size: 28px;
}

.staff-selection-visual-overlay .numpad-key.function::before {
  background: rgba(255, 255, 255, 0.2);
}

.staff-selection-visual-overlay .numpad-key.function:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

/* ================================================
   Overlay Message
   ================================================ */

.overlay-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  color: var(--staff-danger);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  border: 2px solid rgba(239, 68, 68, 0.3);
  z-index: 10001;
  display: none;
  animation: shakeError 0.5s ease;
}

@keyframes shakeError {
  0%,
  100% {
    transform: translate(-50%, -50%) translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate(-50%, -50%) translateX(-10px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translate(-50%, -50%) translateX(10px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================================================
   Responsive Design
   ================================================ */

/* Large Desktop - 1400px+ */
@media (min-width: 1400px) {
  .numpad-key {
    width: 110px;
    height: 80px;
    font-size: 26px;
  }

  .staff-item {
    min-width: 260px;
  }

  .staff-selection-logo-text {
    font-size: 52px;
  }

  .staff-selection-tagline {
    font-size: 22px;
  }
}

/* Desktop - 1200px to 1399px */
@media (max-width: 1399px) and (min-width: 1200px) {
  .numpad-container {
    padding: var(--space-lg);
  }

  .numpad-key {
    width: 100px;
    height: 75px;
    font-size: 24px;
  }

  .staff-item {
    min-width: 240px;
  }
}

/* Laptop - 1025px to 1199px */
@media (max-width: 1199px) and (min-width: 1025px) {
  .staff-list {
    left: var(--space-lg);
    max-height: 60vh;
  }

  .numpad-container {
    padding: var(--space-lg);
  }

  .numpad-key {
    width: 95px;
    height: 70px;
    font-size: 22px;
  }

  .staff-item {
    min-width: 220px;
  }
}

/* Tablet - 769px to 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Branding - Üstte Ortada */
  .staff-selection-branding {
    top: var(--space-2xl);
  }

  .staff-selection-logo-text {
    font-size: 42px;
  }

  .staff-selection-tagline {
    font-size: 18px;
  }

  /* Personel Listesi - Sol Tarafta */
  .staff-list {
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    max-height: 65vh;
    width: auto;
  }

  .staff-item {
    min-width: 200px;
  }

  /* Numpad - Ortada Altta */
  .numpad-container {
    left: 50%;
    bottom: var(--space-xl);
    padding: var(--space-lg);
  }

  .numpad-key {
    width: 88px;
    height: 68px;
    font-size: 21px;
  }
}

/* Mobil - Max 768px */
@media (max-width: 768px) {
  /* Branding - En Üstte */
  .staff-selection-branding {
    top: var(--space-lg);
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    padding: var(--space-md);
  }

  .staff-selection-logo {
    flex-direction: row;
    gap: var(--space-md);
  }

  .staff-selection-logo-icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .staff-selection-logo-text {
    font-size: 36px;
  }

  .staff-selection-tagline {
    font-size: 15px;
  }

  /* Personel Listesi - Branding'in Altında */
  .staff-list {
    position: fixed;
    top: 140px;
    left: var(--space-md);
    right: var(--space-md);
    transform: none;
    flex-direction: row;
    max-width: calc(100vw - 2rem);
    width: calc(100vw - 2rem);
    max-height: none;
    padding: var(--space-md);
    gap: var(--space-md);
    overflow-x: auto;
    overflow-y: visible;
    background: rgba(255, 99, 72, 0.12);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.25);
  }

  .staff-list::-webkit-scrollbar {
    height: 8px;
  }

  .staff-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
  }

  .staff-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
  }

  .staff-item {
    min-width: 180px;
    flex-shrink: 0;
    padding: var(--space-md) var(--space-lg);
  }

  .staff-item .avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .staff-item .name {
    font-size: 15px;
  }

  /* Numpad - En Altta, Ekrana Yayılmış */
  .numpad-container {
    position: fixed;
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-lg);
    transform: none;
    width: calc(100vw - 2rem);
    max-width: none;
    padding: var(--space-lg);
  }

  .pin-input-overlay-field {
    padding: var(--space-md);
    font-size: 17px;
    letter-spacing: 3px;
  }

  .numpad-grid {
    gap: var(--space-md);
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }

  .numpad-key {
    width: 100%;
    height: 68px;
    font-size: 22px;
  }

  .numpad-key.primary,
  .numpad-key.function {
    font-size: 15px;
  }
}

/* Küçük Mobil - Max 480px */
@media (max-width: 480px) {
  /* Branding - Kompakt */
  .staff-selection-branding {
    top: var(--space-sm);
    padding: var(--space-sm);
  }

  .staff-selection-logo {
    gap: var(--space-sm);
  }

  .staff-selection-logo-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .staff-selection-logo-text {
    font-size: 32px;
  }

  .staff-selection-tagline {
    font-size: 14px;
  }

  /* Personel Listesi - Kompakt */
  .staff-list {
    top: 110px;
    left: var(--space-sm);
    right: var(--space-sm);
    width: calc(100vw - 1rem);
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .staff-item {
    min-width: 160px;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
  }

  .staff-item .avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }

  .staff-item .name {
    font-size: 14px;
  }

  /* Numpad - Tam Ekran Yayılmış */
  .numpad-container {
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: var(--space-sm);
    width: calc(100vw - 1rem);
    padding: var(--space-md);
  }

  .pin-input-overlay-field {
    padding: var(--space-sm) var(--space-md);
    font-size: 16px;
    letter-spacing: 2px;
  }

  .numpad-grid {
    gap: var(--space-sm);
  }

  .numpad-key {
    height: 64px;
    font-size: 20px;
  }

  .numpad-key.primary,
  .numpad-key.function {
    font-size: 14px;
  }
}

/* Çok Küçük Mobil - Max 360px */
@media (max-width: 360px) {
  .staff-selection-branding {
    top: var(--space-xs);
  }

  .staff-selection-logo-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .staff-selection-logo-text {
    font-size: 28px;
  }

  .staff-selection-tagline {
    font-size: 13px;
  }

  .staff-list {
    top: 95px;
    padding: var(--space-xs);
    gap: var(--space-xs);
  }

  .staff-item {
    min-width: 140px;
    padding: var(--space-xs) var(--space-sm);
  }

  .staff-item .avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .staff-item .name {
    font-size: 13px;
  }

  .numpad-container {
    padding: var(--space-sm);
  }

  .numpad-key {
    height: 60px;
    font-size: 19px;
  }

  .numpad-key.primary,
  .numpad-key.function {
    font-size: 13px;
  }
}

/* ================================================
   Loading & Animations
   ================================================ */

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* ================================================
   Print Styles
   ================================================ */

@media print {
  .staff-selection-container {
    display: none;
  }
}
