﻿/* =========================================================
   NuestroSi Dashboard — design system
   Palette:  bg #f7f2ed | sidebar #fff | rose #e8748a
             dark #2c2825 | text #1a1614 | muted #6b5e58
========================================================= */

/* ── Reset & base ──────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px}
body.ns-body{
  font-family:'Manrope',sans-serif;
  background:#f7f2ed;
  color:#1a1614;
  min-height:100vh;
}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
img{display:block;max-width:100%}

/* ── Loading overlay ───────────────────────────────────── */
.ns-loading-overlay{
  position:fixed;inset:0;
  display:flex;align-items:center;justify-content:center;
  background:#f7f2ed;
  z-index:9000;
}
.ns-spinner{
  width:40px;height:40px;
  border:3px solid #e8d8d0;
  border-top-color:#e8748a;
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── App shell ─────────────────────────────────────────── */
.ns-app{
  display:flex;
  min-height:100vh;
}

/* ── Sidebar ───────────────────────────────────────────── */
.ns-sidebar{
  width:260px;
  flex-shrink:0;
  background:#fff;
  border-right:1px solid #ede5de;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
}
.ns-sidebar-top{
  flex:1;
  padding:28px 20px 16px;
  display:flex;
  flex-direction:column;
  gap:24px;
}
.ns-sidebar-bottom{
  padding:16px 20px 24px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ns-version{
  font-size:.60rem;
  font-weight:400;
  color:#9b8c85;
  letter-spacing:0.04em;
  margin:0;
  opacity:.8;
}
.ns-version--right{
  text-align:right;
}

/* User chip */
.ns-sidebar-user{
  display:flex;
  align-items:center;
  gap:12px;
  background:#f9f5f1;
  border-radius:12px;
  padding:10px 12px;
}
.ns-avatar{
  width:36px;height:36px;
  border-radius:50%;
  background:#e8748a;
  background-size:cover;
  background-position:center;
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:.8rem;font-weight:700;
  flex-shrink:0;
}
.ns-sidebar-user-info{
  display:flex;flex-direction:column;
  overflow:hidden;
}
.ns-sidebar-name{
  font-size:.82rem;font-weight:600;
  color:#1a1614;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ns-sidebar-date{
  font-size:.72rem;color:#9b8c85;
}

/* Nav */
.ns-nav{
  display:flex;flex-direction:column;gap:4px;
}
.ns-nav-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;
  border-radius:10px;
  font-size:.85rem;font-weight:500;
  color:#6b5e58;
  transition:background .15s,color .15s;
}
.ns-nav-item:hover{background:#f7f2ed;color:#1a1614}
.ns-nav-item--active{
  background:#fdf0f2;
  color:#e8748a;
  pointer-events:none;
}
.ns-nav-item--soon{
  opacity:.45;
  cursor:default;
  pointer-events:none;
}

/* Preview / Logout */
.ns-preview-btn{
  width:100%;
  padding:10px 0;
  background:#2c2825;
  color:#f7f2ed;
  border:none;
  border-radius:10px;
  font-size:.82rem;font-weight:600;
  letter-spacing:.04em;
  transition:opacity .15s;
}
.ns-preview-btn:hover{opacity:.88}
.ns-logout-btn{
  width:100%;
  padding:9px 0;
  background:transparent;
  color:#9b8c85;
  border:1px solid #ede5de;
  border-radius:10px;
  font-size:.78rem;font-weight:500;
  transition:border-color .15s,color .15s;
}
.ns-logout-btn:hover{border-color:#e8748a;color:#e8748a}

/* ── Main area ─────────────────────────────────────────── */
.ns-main{
  flex:1;
  min-width:0;
  padding:36px 40px 48px;
  display:flex;flex-direction:column;
  gap:28px;
  overflow-y:auto;
}

/* Main header */
.ns-main-header{
  display:flex;align-items:flex-end;justify-content:space-between;
  flex-wrap:wrap;gap:16px;
}
.ns-main-header .ns-brand{
  flex:0 0 100%;
  margin-bottom:4px;
  pointer-events:none;
}
.ns-main-header .ns-brand > *{
  pointer-events:auto;
}
.ns-eyebrow{
  font-size:.78rem;font-weight:600;
  color:#9b8c85;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:6px;
}
.ns-main-title{
  font-family:'Cormorant Garamond',serif;
  font-size:2.1rem;font-weight:500;
  color:#2c2825;
  line-height:1.1;
}
.ns-main-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.ns-create-btn{
  display:flex;align-items:center;gap:7px;
  padding:10px 20px;
  background:#e8748a;
  color:#fff;
  border:none;
  border-radius:24px;
  font-size:.83rem;font-weight:600;
  letter-spacing:.02em;
  transition:background .15s;
  white-space:nowrap;
}
.ns-create-btn:hover{background:#d9637a}
.ns-create-btn svg{flex-shrink:0}
.ns-avatar-btn,
.ns-avatar-link{
  padding:0;
  border:none;
  background:transparent;
  cursor:pointer;
  border-radius:50%;
  flex-shrink:0;
  line-height:0;
}
.ns-avatar-btn:focus-visible,
.ns-avatar-link:focus-visible{outline:2px solid #e8748a;outline-offset:2px}
.ns-avatar--btn{
  width:40px;height:40px;
  font-size:.9rem;
  background-size:cover;
  background-position:center;
}
.ns-logout-btn--header{
  width:auto;
  padding:10px 18px;
  border-radius:24px;
  background:#fff;
  color:#6b5e58;
  font-size:.82rem;
  font-weight:600;
  letter-spacing:.02em;
  white-space:nowrap;
}
.ns-logout-btn--header:hover{border-color:#e8748a;color:#e8748a}

/* Filters */
.ns-filters{
  display:flex;gap:8px;flex-wrap:wrap;
}
.ns-filter-btn{
  padding:7px 18px;
  background:#fff;
  border:1px solid #ede5de;
  border-radius:20px;
  font-size:.8rem;font-weight:500;
  color:#6b5e58;
  transition:all .15s;
}
.ns-filter-btn:hover{border-color:#e8748a;color:#e8748a}
.ns-filter-btn--active{
  background:#e8748a;
  border-color:#e8748a;
  color:#fff;
}

/* Events section */
.ns-events-section{display:flex;flex-direction:column;gap:16px}

/* Events grid */
.ns-events-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:20px;
}

/* Skeleton */
.ns-events-skeleton{
  display:contents;
}
.ns-skel-card{
  height:280px;
  border-radius:16px;
  background:linear-gradient(90deg,#ede5de 25%,#f5ede8 50%,#ede5de 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Empty state */
.ns-empty-state{
  display:flex;flex-direction:column;align-items:center;
  gap:14px;padding:60px 20px;
  text-align:center;color:#9b8c85;
}
.ns-empty-state p{font-size:.9rem;line-height:1.6}

/* Event card */
.ns-event-card{
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  border:1px solid #ede5de;
  display:flex;flex-direction:column;
  transition:box-shadow .2s,transform .2s;
  aspect-ratio:1/1;
}
.ns-event-card:hover{
  box-shadow:0 8px 28px rgba(44,40,37,.1);
  transform:translateY(-2px);
}
.ns-event-cover{
  height:140px;
  background:#f0ebe4;
  position:relative;
  overflow:hidden;
}
.ns-event-cover img{
  width:100%;height:100%;
  object-fit:cover;
}
.ns-event-cover-placeholder{
  width:100%;height:100%;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#f7ede6 0%,#ede0d8 100%);
  font-family:'Cormorant Garamond',serif;
  font-size:1.6rem;
  color:#b8a89e;
  letter-spacing:.06em;
}

/* Status badge */
.ns-badge{
  position:absolute;top:12px;right:12px;
  padding:4px 10px;
  border-radius:12px;
  font-size:.68rem;font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.ns-badge--active{background:#d1fae5;color:#065f46}
.ns-badge--draft{background:#f3f4f6;color:#374151}
.ns-badge--archived{background:#f1f1f1;color:#6b7280}

/* Event body */
.ns-event-body{
  padding:16px;
  display:flex;flex-direction:column;
  gap:6px;flex:1;
}
.ns-event-names{
  font-family:'Cormorant Garamond',serif;
  font-size:1.15rem;font-weight:500;
  color:#2c2825;
  line-height:1.2;
}
.ns-event-date{
  font-size:.76rem;color:#9b8c85;
}
.ns-event-link{
  margin-top:auto;padding-top:10px;
  font-size:.78rem;font-weight:600;
  color:#e8748a;
  display:inline-flex;align-items:center;gap:4px;
}
.ns-event-link:hover{text-decoration:underline}

/* "Nuevo sueno" new-event card */
.ns-new-event-card{
  background:#fff;
  border-radius:16px;
  border:2px dashed #f0b8c2;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:10px;
  min-height:240px;
  padding:24px;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s,background .15s;
}
.ns-new-event-card:hover{border-color:#e8748a;background:#fdf7f8}
.ns-new-event-card-icon{
  width:44px;height:44px;
  border-radius:50%;
  background:#fce8ec;
  display:flex;align-items:center;justify-content:center;
}
.ns-new-event-card-title{
  font-family:'Cormorant Garamond',serif;
  font-size:1.1rem;color:#2c2825;font-weight:500;
}
.ns-new-event-card-link{
  font-size:.72rem;font-weight:700;
  letter-spacing:.08em;
  color:#e8748a;
  text-transform:uppercase;
}

/* Pending-order card */
.ns-pending-order-card{
  background:#fffbf0;
  border-radius:16px;
  border:2px solid #f5c842;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:10px;
  min-height:240px;
  padding:24px;
  text-align:center;
  opacity:.9;
}
.ns-pending-order-card-icon{
  width:44px;height:44px;
  border-radius:50%;
  background:#fef9e7;
  display:flex;align-items:center;justify-content:center;
  color:#d4a017;
}
.ns-pending-order-card-title{
  font-family:'Cormorant Garamond',serif;
  font-size:1.1rem;color:#2c2825;font-weight:500;
}
.ns-pending-order-card-label{
  font-size:.8rem;color:#7a6a55;font-weight:600;
}
.ns-pending-order-card-msg{
  font-size:.82rem;color:#7a6a55;line-height:1.4;
}
.ns-pending-order-card-actions{margin-top:4px;}
.ns-pending-order-verify-btn{
  display:inline-block;
  padding:8px 20px;
  background:#2c2825;
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.06em;
  cursor:pointer;
  text-transform:uppercase;
  text-decoration:none;
  transition:background .15s;
}
.ns-pending-order-verify-btn:hover{background:#e8748a;}
.ns-pending-order-verify-btn:disabled{opacity:.6;cursor:default;}
.ns-pending-order-toast{
  margin-top:8px;
  font-size:.78rem;
  color:#c0392b;
  background:#fdecea;
  border-radius:6px;
  padding:6px 12px;
}

/* Stats row */
.ns-stats-row{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}
.ns-stat-card{
  background:#fff;
  border-radius:14px;
  border:1px solid #ede5de;
  padding:20px;
  display:flex;flex-direction:column;gap:6px;
}
.ns-stat-card--accent{background:#fdf0f2;border-color:#f5c8d0}
.ns-stat-icon{
  width:36px;height:36px;
  border-radius:8px;
  background:#f7f2ed;
  display:flex;align-items:center;justify-content:center;
  margin-bottom:4px;
  color:#6b5e58;
}
.ns-stat-label{font-size:.73rem;font-weight:700;letter-spacing:.07em;color:#9b8c85;text-transform:uppercase}
.ns-stat-value{font-family:'Cormorant Garamond',serif;font-size:2rem;font-weight:500;color:#2c2825;line-height:1}
.ns-stat-sub{font-size:.73rem;color:#9b8c85}
.ns-stat-body{font-size:.8rem;color:#6b5e58;line-height:1.5}
.ns-stat-link{
  font-size:.72rem;font-weight:700;
  letter-spacing:.07em;
  color:#e8748a;
  text-transform:uppercase;
  margin-top:4px;
}

/* Footer */
.ns-footer{
  margin-top:auto;
  padding-top:32px;
  border-top:1px solid #ede5de;
  font-size:.73rem;
  color:#9b8c85;
  display:flex;flex-direction:column;gap:4px;
}
.ns-footer a{color:#9b8c85;text-decoration:underline}
.ns-footer a:hover{color:#e8748a}

/* ── Pending invites section ───────────────────────────── */
.ns-pending-section{
  display:flex;flex-direction:column;
  gap:14px;
}
.ns-pending-title{
  font-family:'Cormorant Garamond',serif;
  font-size:1.45rem;font-weight:500;
  color:#2c2825;
}
.ns-pending-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:12px;
}

/* Pending card */
.ns-pending-card{
  background:#fff;
  border:1px solid #ede5de;
  border-radius:16px;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  gap:14px;
  transition:box-shadow .2s,transform .2s;
}
.ns-pending-card:hover{
  box-shadow:0 4px 18px rgba(44,40,37,.09);
  transform:translateY(-1px);
}
.ns-pending-card-body{
  display:flex;flex-direction:column;gap:4px;
}
.ns-pending-names{
  font-family:'Cormorant Garamond',serif;
  font-size:1.25rem;font-weight:500;
  color:#2c2825;line-height:1.25;
}
.ns-pending-role{
  font-size:.75rem;color:#9b8c85;
}
.ns-pending-card-actions{
  display:flex;gap:8px;
}
.ns-pending-btn{
  padding:8px 16px;
  border-radius:20px;
  font-size:.78rem;font-weight:600;
  letter-spacing:.02em;
  border:1px solid transparent;
  transition:background .15s,color .15s,border-color .15s,opacity .15s;
  white-space:nowrap;
}
.ns-pending-btn--accept{
  background:#e8748a;
  color:#fff;
  border-color:#e8748a;
}
.ns-pending-btn--accept:hover:not(:disabled){
  background:#d9637a;border-color:#d9637a;
}
.ns-pending-btn--reject{
  background:transparent;
  color:#6b5e58;
  border-color:#ede5de;
}
.ns-pending-btn--reject:hover:not(:disabled){
  border-color:#c09090;color:#2c2825;
}
.ns-pending-btn:disabled{opacity:.5;cursor:default}

/* Pending skeleton card */
.ns-pending-skel{
  background:#fff;
  border:1px solid #ede5de;
  border-radius:16px;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.ns-pending-skel-body{
  display:flex;flex-direction:column;gap:8px;
}
.ns-pending-skel-line{
  height:14px;border-radius:7px;
  background:linear-gradient(90deg,#ede5de 25%,#f5ede8 50%,#ede5de 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
}
.ns-pending-skel-line--short{width:45%;height:11px;}
.ns-pending-skel-actions{display:flex;gap:8px;}
.ns-pending-skel-btn{
  width:80px;height:34px;border-radius:20px;
  background:linear-gradient(90deg,#ede5de 25%,#f5ede8 50%,#ede5de 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
}

/* ── Responsive ────────────────────────────────────────── */
@media(max-width:768px){
  .ns-app{flex-direction:column}
  .ns-sidebar{
    width:100%;
    height:auto;
    position:static;
    border-right:none;
    border-bottom:1px solid #ede5de;
  }
  .ns-sidebar-top{padding:20px 16px 12px}
  .ns-nav{flex-direction:row;flex-wrap:wrap;gap:6px}
  .ns-nav-item{padding:6px 10px;font-size:.78rem}
  .ns-main{padding:24px 16px 36px}
  .ns-main-header{align-items:flex-start}
  .ns-main-actions{width:100%;justify-content:flex-start}
  .ns-create-btn,.ns-logout-btn--header{padding:10px 16px}
  .ns-events-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
}
