/* ============================================================
   Escort Almeria — app.css
   CSS puro, sin frameworks
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Variables
   ------------------------------------------------------------ */
:root {
  --primary:       #c8102e;
  --primary-dark:  #a00d25;
  --primary-light: #f8e6ea;
  --dark:          #1a1a1a;
  --gray:          #555;
  --light-gray:    #f5f5f5;
  --border:        #ddd;
  --white:         #fff;
  --success:       #2d7a2d;
  --success-light: #e8f5e8;
  --error:         #c8102e;
  --error-light:   #fdecea;
  --warning:       #a05000;
  --warning-light: #fff3e0;
  --radius:        6px;
  --radius-lg:     10px;
  --shadow:        0 2px 8px rgba(0,0,0,0.10);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.14);
  --transition:    0.18s ease;
}

/* ------------------------------------------------------------
   2. Reset / Normalize
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); text-decoration: underline; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.25rem; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

small { font-size: 0.85rem; color: var(--gray); }

/* ------------------------------------------------------------
   3. Layout Utilities
   ------------------------------------------------------------ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

.main-content {
  flex: 1;
  padding: 2rem 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-danger { color: var(--error); }
.text-success { color: var(--success); }
.text-muted  { color: var(--gray); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Margin top */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Margin bottom */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ------------------------------------------------------------
   4. Site Header / Nav
   ------------------------------------------------------------ */
.site-header {
  background: var(--dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.site-header .logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .logo:hover { color: var(--primary); text-decoration: none; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-header nav a {
  color: #ccc;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.site-header nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* btn-link: looks like a link, used in nav for logout button */
.btn-link {
  background: none;
  border: none;
  color: #ccc;
  padding: 0.35rem 0.65rem;
  font-size: 0.92rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.btn-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* ------------------------------------------------------------
   5. Footer
   ------------------------------------------------------------ */
.site-footer {
  background: var(--dark);
  color: #999;
  padding: 1.25rem 0;
  font-size: 0.875rem;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer p { margin: 0; text-align: center; }

.site-footer a {
  color: #aaa;
  text-decoration: none;
  transition: color var(--transition);
}
.site-footer a:hover { color: var(--white); }

/* ------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--light-gray);
  border-color: #bbb;
  color: var(--dark);
}

.btn-danger {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
}
.btn-danger:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-full {
  display: flex;
  width: 100%;
}

.btn-disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ------------------------------------------------------------
   7. Forms
   ------------------------------------------------------------ */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--dark);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}

.form-group input[type="file"] {
  padding: 0.4rem;
  background: var(--light-gray);
  cursor: pointer;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  display: block;
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 0.3rem;
  font-weight: 500;
}

.form-group small.verified {
  color: var(--success);
  font-weight: 600;
}

/* Checkbox / radio labels */
.checkbox-label,
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"],
.radio-group input[type="radio"] {
  width: auto;
  display: inline;
  margin: 0;
  accent-color: var(--primary);
}

.radio-group {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Two-column form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

/* Inline form row */
.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.form-row input,
.form-row select {
  flex: 1;
  min-width: 180px;
}

/* Form card (contact, auth) */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------------
   8. Cards
   ------------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.card h3 {
  font-size: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
}

/* Profile card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

/* ------------------------------------------------------------
   9. Profile Card
   ------------------------------------------------------------ */
.profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.profile-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.profile-card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.profile-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  background: var(--light-gray);
}

.photo-placeholder {
  width: 100%;
  height: 240px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.9rem;
}
.photo-placeholder.large {
  height: 320px;
  font-size: 1rem;
}

.profile-card-info {
  padding: 0.85rem 1rem;
}

.profile-card-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--dark);
  font-weight: 700;
}

.location {
  font-size: 0.82rem;
  color: var(--gray);
  display: block;
  margin-bottom: 0.35rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--border);
  color: var(--gray);
}
.badge-boost {
  background: var(--primary);
  color: var(--white);
}
.badge-success {
  background: var(--success);
  color: var(--white);
}
.badge-warning {
  background: #e67e00;
  color: var(--white);
}

/* ------------------------------------------------------------
   10. Profile Detail
   ------------------------------------------------------------ */

/* Tarjeta principal: foto + datos */
.profile-main-card {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
}

.profile-main-photo {
  position: relative;
  min-height: 480px;
}

.profile-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-main-photo .photo-placeholder {
  height: 100%;
  min-height: 480px;
  background: #2a2a2a;
}

.profile-main-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-main-info h1 {
  font-size: 2rem;
  color: #fff;
  margin: 0;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.meta-item {
  font-size: 0.92rem;
  color: #999;
}

.profile-description {
  font-size: 0.97rem;
  color: #bbb;
  line-height: 1.75;
  white-space: pre-line;
  margin: 0;
  flex: 1;
}

.profile-contact {
  border-top: 1px solid #2a2a2a;
  padding-top: 1.25rem;
}

.profile-contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.profile-contact h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-bottom: 0.75rem;
}

.profile-contact .btn {
  background: #2e2e2e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
}
.profile-contact .btn:hover {
  background: #3d3d3d;
  border-color: #666;
  color: #fff;
}
.profile-contact .btn-primary {
  background: #2e2e2e;
  border-color: #444;
  color: #fff;
}
.profile-contact .btn-primary:hover {
  background: #3d3d3d;
  border-color: #666;
}

/* Galería de fotos adicionales */
.profile-gallery {
  margin-bottom: 3rem;
}

.profile-gallery h2 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #2a2a2a;
}

.profile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.profile-gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Legacy selectors kept for other uses */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------
   11. Alerts
   ------------------------------------------------------------ */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  border-left: 4px solid transparent;
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border-left-color: var(--success);
}

.alert-error {
  background: var(--error-light);
  color: var(--error);
  border-left-color: var(--error);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning);
  border-left-color: var(--warning);
}

/* ------------------------------------------------------------
   12. Panel Layout (escort + admin)
   ------------------------------------------------------------ */
.panel-body {
  background: var(--light-gray);
}

.panel-header {
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.panel-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1rem;
}

.panel-header .logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
}
.panel-header .logo:hover { color: var(--primary); text-decoration: none; }

.panel-header span {
  color: #aaa;
  font-size: 0.88rem;
  flex: 1;
}

.panel-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  align-items: start;
}

.panel-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 72px;
}

.panel-sidebar nav {
  display: flex;
  flex-direction: column;
}

.panel-sidebar nav a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.93rem;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}

.panel-sidebar nav a:hover {
  background: var(--light-gray);
  color: var(--primary);
  text-decoration: none;
}

.panel-sidebar nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.panel-content {
  min-width: 0;
}

/* Panel section label in sidebar */
.sidebar-section {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
}

/* Action row (flex row of buttons) */
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* Status indicators */
.status-ok {
  color: var(--success);
  font-weight: 600;
}
.status-warning {
  color: var(--warning);
  font-weight: 600;
}

/* ------------------------------------------------------------
   13. Photo Grid
   ------------------------------------------------------------ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.photo-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-gray);
}

.photo-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.photo-status {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem;
  text-transform: uppercase;
}
.photo-status.approved { background: var(--success-light); color: var(--success); }
.photo-status.pending  { background: var(--warning-light); color: var(--warning); }

.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.4rem;
}

.photo-actions .reorder-group {
  display: flex;
  gap: 0.3rem;
}

.photo-actions .reorder-group form,
.photo-actions .reorder-group span {
  flex: 1;
}

.photo-actions .reorder-group .btn {
  width: 100%;
  justify-content: center;
}

.photo-actions > form .btn {
  width: 100%;
  justify-content: center;
}

.photo-actions--single {
  grid-template-columns: 1fr;
}

.photo-item form { margin: 0; }

/* ------------------------------------------------------------
   14. Admin Table
   ------------------------------------------------------------ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.admin-table th {
  background: var(--light-gray);
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray);
}

.admin-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td { background: #fafafa; }

.admin-table td form { display: inline; }
.admin-table td .btn { margin-right: 0.3rem; }

/* Search bar for admin */
.search-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-bar input[type="text"],
.search-bar select {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.93rem;
}

/* ------------------------------------------------------------
   15. Pagination
   ------------------------------------------------------------ */
.pagination {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--dark);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}

.pagination a:hover {
  background: var(--light-gray);
  text-decoration: none;
}

.pagination a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 700;
}

/* ------------------------------------------------------------
   16. Public site — dark theme
   ------------------------------------------------------------ */
.public-site {
  background: #111;
  color: #ccc;
}

.public-site .main-content {
  padding: 0;
}

.public-site a { color: #e8a0a0; }
.public-site a:hover { color: #fff; }

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  background: linear-gradient(180deg, #1a0a0e 0%, #111 100%);
  border-bottom: 1px solid #222;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.hero p {
  color: #888;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.gender-nav {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.profiles-section {
  padding: 2.5rem 0;
}

.profiles-section h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  padding-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.profiles-section h2::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--primary);
  margin-top: 0.35rem;
}

.public-site h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Profile card — dark redesign */
.profile-card {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.profile-card:hover {
  transform: translateY(-3px);
  border-color: #444;
}

.profile-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.profile-card-photo {
  position: relative;
  overflow: hidden;
}

.profile-card-photo img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.profile-card:hover .profile-card-photo img {
  transform: scale(1.04);
}

.profile-card-photo .photo-placeholder {
  width: 100%;
  height: 280px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.profile-card-photo .badge-boost {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
}

.profile-card-info {
  padding: 1rem 1.1rem 0.75rem;
  flex: 1;
}

.profile-card-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.profile-card-info .location {
  font-size: 0.82rem;
  color: #777;
  display: block;
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-card-footer {
  padding: 0.65rem 1.1rem;
  border-top: 1px solid #2a2a2a;
  font-size: 0.82rem;
  color: #666;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.profile-card:hover .profile-card-footer {
  color: var(--primary);
}

.empty {
  color: #555;
  font-style: italic;
  grid-column: 1 / -1;
  padding: 2rem 0;
}

/* Public profiles page title */
.public-site .page-header-public {
  padding: 2rem 0 0;
}

.public-site .page-header-public h1 {
  font-size: 1.8rem;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   17. Auth Cards
   ------------------------------------------------------------ */
.auth-card {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Auth card dentro del sitio público (tema oscuro) */
.public-site .auth-card {
  background: #1e1e1e;
  border-color: #2a2a2a;
  color: #ccc;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.public-site .auth-card h1 {
  color: #fff;
}

.public-site .auth-card label {
  color: #bbb;
}

.public-site .auth-card small {
  color: #666;
}

.public-site .auth-card input[type="text"],
.public-site .auth-card input[type="email"],
.public-site .auth-card input[type="password"],
.public-site .auth-card select,
.public-site .auth-card textarea {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #ddd;
}

.public-site .auth-card input:focus,
.public-site .auth-card select:focus,
.public-site .auth-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.18);
}

.public-site .auth-card .text-muted {
  color: #666;
}

.public-site .auth-card .auth-links a {
  color: #e8a0a0;
}
.public-site .auth-card .auth-links a:hover {
  color: #fff;
}

/* ------------------------------------------------------------
   18. Legal / Privacy pages
   ------------------------------------------------------------ */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h1 {
  margin-bottom: 1.5rem;
}

.legal-page h2 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal-page p,
.legal-page ul {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ------------------------------------------------------------
   19. Contact success
   ------------------------------------------------------------ */
.success-box {
  text-align: center;
  padding: 3rem 1rem;
}
.success-box h2 { color: var(--success); }

/* ------------------------------------------------------------
   20. Misc panel helpers
   ------------------------------------------------------------ */
/* Contacts table message column truncation */
.message-excerpt {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin badge in header */
.admin-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* Page title with back link */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-header h1 { margin-bottom: 0; }

/* ------------------------------------------------------------
   Contact form wrapper — 50% on desktop, 100% on mobile
   ------------------------------------------------------------ */
.contact-form-wrap {
  width: 50%;
  margin: 0 auto;
}
.contact-form-wrap .auth-card {
  max-width: 100%;
}

/* ------------------------------------------------------------
   21. Media Queries — Mobile
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .panel-layout {
    grid-template-columns: 1fr;
  }

  .panel-sidebar {
    position: static;
  }

  .panel-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .panel-sidebar nav a {
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .panel-sidebar nav a.active {
    border-left: none;
    border-bottom-color: var(--primary);
  }

  .profile-main-card {
    grid-template-columns: 1fr;
  }

  .profile-main-photo {
    min-height: 320px;
  }

  .profile-gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contact-form-wrap {
    width: 100%;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }

  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 0.5rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.1rem;
  }

  .site-header nav a,
  .btn-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem;
  }

  .profile-card img,
  .photo-placeholder {
    height: 190px;
  }

  .hero { padding: 2rem 0.5rem 1.5rem; }
  .hero h1 { font-size: 1.8rem; }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .auth-card,
  .form-card {
    padding: 1.25rem;
    margin: 0.5rem auto;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row {
    flex-direction: column;
  }
  .action-row .btn { width: 100%; justify-content: center; }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-info {
    flex-direction: column;
  }
  .contact-info .btn { width: 100%; text-align: center; justify-content: center; }

  .form-row {
    flex-direction: column;
  }

  .pagination a {
    min-width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}
