/* ================= RENTING DASHBOARD STYLES ================= */

body {
  background-color: #0a0a0a !important;
  background-image: none !important;
}

body::before { display: none; }

.navbar { position: relative; z-index: 100; }

/* ================= PAGE WRAPPER ================= */
.page-wrapper {
  background: #0a0a0a;
  min-height: 100vh;
}

/* ================= DASHBOARD BLOCK ================= */
.dashboard-block {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  background: #0a0a0a;
  overflow: hidden;
}

/* ================= RENTING HEADER ================= */
.renting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 48px 0;
  flex-shrink: 0;
}

.renting-header-left h1 {
  font-size: 26px;
  color: white;
  margin: 0 0 4px 0;
  font-weight: 600;
  line-height: 1.2;
}

.renting-header-left .subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
}

.renting-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

/* ================= SEARCH BAR ================= */
.search-bar-dashboard { position: relative; }

.search-bar-dashboard input {
  width: 230px;
  padding: 9px 36px 9px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.search-bar-dashboard input::placeholder { color: rgba(255, 255, 255, 0.28); }
.search-bar-dashboard input:focus { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }

.search-bar-dashboard .search-icon {
  position: absolute; right: 11px; top: 50%;
  transform: translateY(-50%); font-size: 13px; opacity: 0.28; pointer-events: none;
}

.list-btn {
  background: #8B0000; border: none; color: white;
  padding: 9px 18px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}

.list-btn:hover { background: #a00000; transform: translateY(-1px); }

/* ================= CONTROLS ROW (tabs + view toggle) ================= */
.controls-section {
  padding: 18px 48px 0;
  flex-shrink: 0;
}

.controls-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tabs-container {
  display: flex;
  gap: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.42);
  padding: 9px 18px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-bottom: -1px;
}

.tab-btn:hover { color: rgba(255, 255, 255, 0.75); }
.tab-btn.active { color: white; border-bottom-color: #8B0000; font-weight: 600; }

/* ================= VIEW TOGGLE BUTTONS ================= */
.view-toggle {
  display: flex;
  gap: 4px;
  align-items: center;
  padding-bottom: 8px;
}

.view-toggle-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.18);
}

.view-toggle-btn.active {
  background: rgba(139, 0, 0, 0.22);
  border-color: rgba(139, 0, 0, 0.5);
  color: #ff6b6b;
}

/* ================= TABLE CONTAINER ================= */
.table-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 48px 20px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 0, 0, 0.55) rgba(255, 255, 255, 0.04);
}

.table-container::-webkit-scrollbar { width: 6px; }
.table-container::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
.table-container::-webkit-scrollbar-thumb { background: rgba(139,0,0,0.55); border-radius: 10px; }
.table-container::-webkit-scrollbar-thumb:hover { background: rgba(170,0,0,0.75); }

/* ================= LISTING COUNT BAR ================= */
.listings-count-bar {
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 13px 48px;
}

.listings-count-bar .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

.footer-count { font-weight: 500; }
.footer-showing { font-weight: 400; }

/* ================= BELOW DASHBOARD ================= */
.below-dashboard { padding: 28px 48px 0; background: #0a0a0a; }

/* ================= RENTINGS TABLE ================= */
.rentings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 2px;
}

.rentings-table thead {
  position: sticky; top: 0; z-index: 2; background: #0a0a0a;
}

.rentings-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.rentings-table tbody tr {
  background: rgba(255, 255, 255, 0.018);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.15s;
}

.rentings-table tbody tr:hover { background: rgba(255, 255, 255, 0.048); }
.rentings-table tbody tr:last-child { border-bottom: none; }

.rentings-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.col-skin { width: 28%; }
.col-price { width: 14%; }
.col-durations { width: 40%; }
.col-action { width: 18%; text-align: center; }
.rentings-table th.col-action { text-align: center; }

/* ================= SKIN CELL ================= */
.skin-cell { display: flex; align-items: center; gap: 13px; }

.skin-icon {
  width: 42px; height: 42px; border-radius: 6px;
  background: #232323; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; overflow: hidden;
}

.skin-icon img { width: 100%; height: 100%; object-fit: contain; }

.skin-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.skin-name {
  font-size: 14px; font-weight: 600; color: white;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.skin-type { font-size: 10px; color: rgba(255, 255, 255, 0.3); text-transform: uppercase; letter-spacing: 0.4px; }

/* ================= PRICE CELL ================= */
.price-value { font-size: 15px; font-weight: 700; color: #FFD700; }
.price-value.no-price { color: rgba(255, 255, 255, 0.2); font-weight: 400; }

/* ================= DURATIONS CELL ================= */
.durations-container { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.duration-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 4px 9px;
  background: rgba(76, 175, 80, 0.13);
  border: 1px solid rgba(76, 175, 80, 0.28);
  border-radius: 4px; font-size: 11px; font-weight: 600; color: #81C784; white-space: nowrap;
}

.duration-badge.unavailable {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

/* ================= TABLE ACTION BUTTONS ================= */
.action-buttons { display: flex; align-items: center; justify-content: center; gap: 7px; }

.view-rent-btn {
  background: #8B0000; border: none; color: white;
  padding: 7px 15px; border-radius: 5px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}

.view-rent-btn:hover { background: #a80000; transform: translateY(-1px); }

.delete-btn {
  width: 27px; height: 27px;
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.28);
  color: #ff6666; border-radius: 4px; font-size: 17px; font-weight: bold;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1; padding: 0; flex-shrink: 0;
}

.delete-btn:hover { background: rgba(255,0,0,0.22); border-color: rgba(255,0,0,0.48); transform: scale(1.05); }

/* ================= GRID CONTAINER ================= */
.rentings-grid-container {
  padding-top: 2px;
}

.rentings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 13vw, 185px), 1fr));
  gap: clamp(8px, 1vw, 14px);
  padding: 4px 0 20px;
}

/* ================= RENTAL GRID CARD ================= */
.rental-grid-card {
  background: #141414;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: default;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.rental-grid-card:hover {
  border-color: rgba(139, 0, 0, 0.45);
  box-shadow: 0 8px 28px rgba(139, 0, 0, 0.15), 0 0 0 1px rgba(139, 0, 0, 0.06);
  transform: translateY(-3px);
}

/* Image area — same dark uniform look as marketplace */
.gc-image-wrap {
  background: #141414;
  height: 105px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gc-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rental-grid-card:hover .gc-image-wrap img { transform: scale(1.06); }

/* Type label — like rarity in marketplace */
.gc-type {
  padding: 9px 10px 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  background: #141414;
  flex-shrink: 0;
}

/* Name — like item name in marketplace */
.gc-name {
  padding: 2px 10px 7px;
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #141414;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

/* Price row */
.gc-price-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #141414;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gc-coin {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(251, 191, 36, 0.3));
  flex-shrink: 0;
}

.gc-price-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(251, 191, 36, 0.6);
  flex-shrink: 0;
}

.gc-price {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  flex: 1;
}

/* Duration badges row */
.gc-durations {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px 8px;
  background: #141414;
  flex-shrink: 0;
}

.gc-duration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.gc-duration.available {
  background: rgba(76, 175, 80, 0.13);
  border: 1px solid rgba(76, 175, 80, 0.28);
  color: #81C784;
}

.gc-duration.unavailable {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.2);
}

/* Grid card actions */
.gc-actions {
  padding: 0 8px 10px;
  background: #141414;
  flex-shrink: 0;
}

.gc-rent-btn {
  width: 100%;
  height: 30px;
  background: #8B0000;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.gc-rent-btn:hover { background: #a80000; }

/* Grid card delete button (owner only) */
.gc-delete-btn {
  position: absolute;
  top: 6px; right: 6px;
  width: 20px; height: 20px;
  background: rgba(220, 38, 38, 0.9);
  color: white; border: none;
  border-radius: 50%; font-size: 13px; font-weight: bold;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  z-index: 10; transition: all 0.2s; line-height: 1;
}

.rental-grid-card:hover .gc-delete-btn { display: flex; }
.gc-delete-btn:hover { background: #7a0000; transform: scale(1.1); }

/* ================= LOADING STATE ================= */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; padding: 80px 20px; min-height: 300px;
}

.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #8B0000;
  border-radius: 50%; animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { font-size: 14px; color: rgba(255, 255, 255, 0.45); margin: 0; }

/* ================= STATS BADGES ================= */
.renting-stats-row { display: flex; gap: 12px; flex-wrap: wrap; }

.renting-stat-badge {
  display: flex; align-items: center; gap: 9px;
  background: rgba(139, 0, 0, 0.18);
  border: 1px solid rgba(139, 0, 0, 0.4);
  border-radius: 7px; padding: 11px 18px;
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.88); white-space: nowrap; flex-shrink: 0;
}

.renting-stat-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }

/* ================= EXTRA INFO BOX ================= */
.renting-info-box {
  margin-top: 16px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 8px; padding: 16px 20px;
}

.renting-info-label {
  display: block; font-size: 10px; font-weight: 700;
  color: rgba(255, 255, 255, 0.35); text-transform: uppercase;
  letter-spacing: 0.7px; margin-bottom: 8px;
}

.renting-info-text { font-size: 13px; color: rgba(255, 255, 255, 0.58); line-height: 1.65; margin: 0; }
.renting-info-link { color: #c0392b; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.renting-info-link:hover { color: #e74c3c; text-decoration: underline; }

/* ================= RENTING PAGE FOOTER ================= */
.renting-page-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.06); }

.renting-page-footer .footer-links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.renting-page-footer .footer-links-left { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.renting-page-footer .footer-link { font-size: 12px; color: rgba(255, 255, 255, 0.38); text-decoration: none; transition: color 0.2s; }
.renting-page-footer .footer-link:hover { color: rgba(255, 255, 255, 0.75); }
.renting-page-footer .footer-links-right { display: flex; gap: 14px; align-items: center; }
.renting-page-footer .footer-icon-link { opacity: 0.45; transition: opacity 0.2s; display: flex; align-items: center; }
.renting-page-footer .footer-icon-link:hover { opacity: 0.8; }
.renting-page-footer .footer-icon-img { width: 18px; height: 18px; object-fit: contain; }
.renting-page-footer .footer-divider { height: 1px; background: rgba(255, 255, 255, 0.05); margin: 14px 0; }
.renting-page-footer .footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; padding-bottom: 28px; }
.renting-page-footer .footer-copy { font-size: 11px; color: rgba(255, 255, 255, 0.25); }
.renting-page-footer .footer-disclaimer { font-size: 11px; color: rgba(255, 255, 255, 0.18); }

/* ================= VIEW RENTAL MODAL ================= */
.rental-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 10000; padding: 20px;
}

.rental-modal-overlay.active { display: flex; }

.rental-modal-box {
  background: linear-gradient(to bottom, #1a1a1a, #0f0f0f);
  border-radius: 10px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9); border: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin; scrollbar-color: rgba(139,0,0,0.5) rgba(255,255,255,0.04);
}

.rental-modal-box::-webkit-scrollbar { width: 5px; }
.rental-modal-box::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
.rental-modal-box::-webkit-scrollbar-thumb { background: rgba(139,0,0,0.5); border-radius: 10px; }

.rental-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.rental-modal-header h2 { font-size: 20px; margin: 0; color: white; font-weight: 600; }

.rental-modal-close {
  background: none; border: none; font-size: 28px; color: rgba(255,255,255,0.5);
  cursor: pointer; line-height: 1; transition: color 0.2s; padding: 0;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
}

.rental-modal-close:hover { color: white; }

.rental-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.rental-modal-top { display: flex; gap: 18px; align-items: flex-start; }

.rental-modal-image {
  width: 100px; height: 100px; object-fit: contain;
  background: rgba(255,255,255,0.03); border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; padding: 8px;
}

.rental-modal-info { flex: 1; }
.rental-modal-name { font-size: 18px; font-weight: 600; color: white; margin-bottom: 6px; }
.rental-modal-type { font-size: 11px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; }

.rental-pricing-section h3 {
  font-size: 12px; color: rgba(255,255,255,0.5); margin: 0 0 12px 0;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}

.rental-pricing-table { display: flex; flex-direction: column; gap: 8px; }

.pricing-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px; padding: 12px 16px; transition: background 0.15s;
}

.pricing-row:hover { background: rgba(255,255,255,0.05); }
.pricing-duration { font-size: 14px; color: white; font-weight: 500; }
.pricing-price { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #FFD700; }
.coin-icon { width: 14px; height: 14px; object-fit: contain; }
.rental-modal-actions { padding-top: 8px; }

.rent-item-btn {
  width: 100%; background: #8B0000; color: white; border: none;
  padding: 14px 20px; border-radius: 7px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}

.rent-item-btn:hover { background: #a00000; transform: translateY(-1px); }

/* ================= CREATE LISTING MODAL ================= */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 10000; padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: linear-gradient(to bottom, #1a1a1a, #0f0f0f);
  border-radius: 10px; max-width: 600px; width: 100%; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 10px 50px rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  scrollbar-width: thin; scrollbar-color: rgba(139,0,0,0.5) rgba(255,255,255,0.04);
}

.modal-content::-webkit-scrollbar { width: 5px; }
.modal-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(139,0,0,0.5); border-radius: 10px; }
.modal-content.large { max-width: 800px; }

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.modal-header h2 { font-size: 20px; margin: 0; color: white; font-weight: 600; }

.modal-close {
  background: none; border: none; font-size: 28px; color: rgba(255,255,255,0.5);
  cursor: pointer; transition: color 0.2s; line-height: 1; padding: 0;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
}

.modal-close:hover { color: white; }

form { padding: 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: rgba(255,255,255,0.8); }

.form-group input, .form-group select {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: white; padding: 10px 12px; border-radius: 6px; font-size: 14px;
  outline: none; transition: all 0.2s; box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }

.duration-group h3 { color: white; font-size: 15px; margin: 18px 0 6px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.06); font-weight: 600; }
.duration-hint { font-size: 12px; color: rgba(255,255,255,0.35); margin-bottom: 16px; margin-top: 0; }
.duration-pair { display: grid; grid-template-columns: 100px 1fr; gap: 12px; margin-bottom: 10px; align-items: center; }

.duration-label {
  display: flex; align-items: center; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 10px 12px;
  font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; white-space: nowrap;
}

.price-input-wrap { position: relative; }

.price-input-wrap input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: white; padding: 10px 50px 10px 12px; border-radius: 6px; font-size: 14px;
  outline: none; transition: all 0.2s; box-sizing: border-box;
}

.price-input-wrap input:focus { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }

.price-input-wrap::after {
  content: 'Coins'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: rgba(255,255,255,0.25); pointer-events: none;
}

.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 20px 26px; border-top: 1px solid rgba(255,255,255,0.06); }

.btn-submit, .btn-cancel { padding: 11px 24px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-submit { background: #8B0000; color: white; }
.btn-submit:hover { background: #a00000; transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-cancel { background: rgba(255,255,255,0.08); color: white; border: 1px solid rgba(255,255,255,0.12); }
.btn-cancel:hover { background: rgba(255,255,255,0.12); }

.item-selector-section { padding: 24px 26px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.item-selector-section h3, .rental-details-section h3 { font-size: 16px; color: white; margin: 0 0 18px; font-weight: 600; }
.rental-details-section { padding: 24px 26px; }
.form-divider { height: 1px; background: rgba(255,255,255,0.06); }

.item-search-bar { position: relative; margin-bottom: 16px; }

.item-search-bar input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: white; padding: 11px 38px 11px 14px; border-radius: 6px; font-size: 14px;
  outline: none; box-sizing: border-box; transition: all 0.2s;
}

.item-search-bar input:focus { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.item-search-bar .search-icon { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0.3; pointer-events: none; }

.items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; max-height: 360px; overflow-y: auto; padding: 14px;
  background: rgba(0,0,0,0.2); border-radius: 8px; border: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: thin; scrollbar-color: rgba(139,0,0,0.5) rgba(255,255,255,0.04);
}

.items-grid::-webkit-scrollbar { width: 6px; }
.items-grid::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
.items-grid::-webkit-scrollbar-thumb { background: rgba(139,0,0,0.5); border-radius: 10px; }

.item-card {
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 10px; cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative;
}

.item-card:hover { border-color: rgba(139,0,0,0.5); background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.item-card.selected { border-color: #8B0000; background: rgba(139,0,0,0.15); box-shadow: 0 0 12px rgba(139,0,0,0.3); }

.item-card.selected::after {
  content: '✓'; position: absolute; top: 6px; right: 6px; background: #8B0000;
  color: white; width: 18px; height: 18px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: bold;
}

.item-card-image { width: 100%; height: 70px; object-fit: contain; background: rgba(0,0,0,0.2); border-radius: 5px; padding: 4px; }

.item-card-name {
  font-size: 10px; color: white; text-align: center; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%;
}

.loading-items { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 20px; }

.loading-spinner-small {
  width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #8B0000; border-radius: 50%; animation: spin 1s linear infinite;
}

.no-items-found { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.35); font-size: 14px; }

.selected-item-display {
  background: rgba(139,0,0,0.12); border: 2px solid rgba(139,0,0,0.3);
  border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; margin-top: 14px;
}

.selected-label { font-size: 11px; font-weight: 700; color: #ff6666; text-transform: uppercase; letter-spacing: 0.5px; }

.selected-item-display img {
  width: 36px; height: 36px; object-fit: contain; background: rgba(0,0,0,0.2);
  border-radius: 5px; border: 1px solid rgba(255,255,255,0.08); padding: 3px;
}

.selected-item-display span:not(.selected-label) { flex: 1; font-size: 13px; color: white; font-weight: 600; }

.change-item-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: white; padding: 6px 14px; border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.change-item-btn:hover { background: rgba(255,255,255,0.12); }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .renting-header { flex-direction: column; gap: 14px; }
  .renting-header-right { width: 100%; }
  .search-bar-dashboard input { width: 100%; }
  .renting-stats-row { flex-direction: column; gap: 8px; }
  .renting-stat-badge { white-space: normal; }
}

@media (max-width: 768px) {
  /* On mobile, grid cards always show their action row */
  .rentings-table thead { display: none; }
  .rentings-table, .rentings-table tbody, .rentings-table tr, .rentings-table td { display: block; width: 100%; }
  .rentings-table tr { margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; overflow: hidden; }
  .rentings-table td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
  .rentings-table td:last-child { border-bottom: none; }
  .rentings-table td::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
  .col-action { text-align: left; }
  .action-buttons { justify-content: flex-start; }
  .duration-pair { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .btn-submit, .btn-cancel { width: 100%; }

  .rentings-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 600px) {
  .renting-header, .controls-section, .table-container, .listings-count-bar, .below-dashboard { padding-left: 16px; padding-right: 16px; }
  .renting-page-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
  .rentings-grid { grid-template-columns: repeat(2, 1fr); }
}