/* ========================================================
   CC.PP. Cocheras Marconi 17 — Main Stylesheet
   ======================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Palette */
  --navy-deep:    #0f1b2d;
  --navy:         #1e3a5f;
  --navy-light:   #2a5080;
  --gold:         #c49a3c;
  --gold-light:   #e8c877;
  --gold-pale:    #f5e6c3;
  --bg:           #f6f5f1;
  --surface:      #ffffff;
  --surface-alt:  #faf9f6;
  --text:         #1e1e1e;
  --text-secondary:#5f6368;
  --text-muted:   #8d9196;
  --border:       #e2dfd8;
  --border-light: #eeece6;
  --success:      #1a7a4c;
  --success-bg:   #e8f5ee;
  --error:        #c0392b;
  --error-bg:     #fce8e6;
  --warning:      #d68910;
  --warning-bg:   #fef5e7;
  --info:         #2980b9;
  --info-bg:      #eaf2f8;

  /* Typography */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

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

  /* Sizes */
  --max-width:  1140px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(15,27,45,0.06);
  --shadow-md:  0 4px 12px rgba(15,27,45,0.08);
  --shadow-lg:  0 8px 30px rgba(15,27,45,0.12);
  --shadow-xl:  0 16px 50px rgba(15,27,45,0.16);

  /* Transitions */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --duration:   0.25s;
}

/* --- Reset & Base --- */
*, *::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: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy-deep);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); }
h4 { font-size: 1.1rem; }

p + p { margin-top: var(--space-md); }

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.gold-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.gold-line--center { margin: var(--space-md) auto; }
.gold-line--left   { margin: var(--space-md) 0; }

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn--primary:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--secondary:hover {
  background: var(--navy);
  color: #fff;
}

.btn--gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn--gold:hover {
  background: #b08930;
  border-color: #b08930;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn--sm  { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn--lg  { padding: 0.9rem 2rem; font-size: 1rem; }
.btn--block { width: 100%; justify-content: center; }

.btn--icon {
  width: 38px; height: 38px;
  padding: 0; justify-content: center;
  border-radius: var(--radius-sm);
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.site-logo__icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--navy-deep);
  font-weight: 800;
}

.site-logo__text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

.site-nav { display: flex; align-items: center; gap: var(--space-xs); }

.site-nav a {
  color: rgba(255,255,255,0.75);
  padding: 0.45rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.site-nav a.active { background: rgba(196,154,60,0.2); color: var(--gold-light); }

.nav-login {
  color: var(--gold-light) !important;
  border: 1px solid rgba(196,154,60,0.4) !important;
  margin-left: var(--space-sm);
}
.nav-login:hover {
  background: var(--gold) !important;
  color: var(--navy-deep) !important;
  border-color: var(--gold) !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: #fff;
  padding: var(--space-4xl) 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 58px,
      rgba(196,154,60,0.06) 58px,
      rgba(196,154,60,0.06) 60px
    );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(196,154,60,0.15);
  border: 1px solid rgba(196,154,60,0.3);
  color: var(--gold-light);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 480px;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero__actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

.hero__stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-3xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
}

.hero__stat span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Sections --- */
.section {
  padding: var(--space-4xl) 0;
}

.section--alt { background: var(--surface); }

.section__header {
  margin-bottom: var(--space-2xl);
}

.section__header--center { text-align: center; }
.section__header--center .gold-line { margin-left: auto; margin-right: auto; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: all var(--duration) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--gold-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-lg);
  color: var(--gold);
}

.card h3 { margin-bottom: var(--space-sm); }

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }

/* --- Info blocks --- */
.info-block {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  padding: var(--space-xl) 0;
}

.info-block + .info-block { border-top: 1px solid var(--border-light); }

.info-block__number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  min-width: 44px;
  padding-top: 2px;
}

.info-block h4 { margin-bottom: var(--space-xs); }

.info-block p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Contact / Map --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.contact-info-item + .contact-info-item { border-top: 1px solid var(--border-light); }

.contact-info-item__icon {
  width: 40px;
  height: 40px;
  background: var(--gold-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-info-item h4 {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.contact-info-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.map-frame {
  width: 100%;
  height: 350px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.6);
  padding: var(--space-2xl) 0;
  font-size: 0.82rem;
  border-top: 3px solid var(--gold);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-footer a {
  color: var(--gold-light);
}
.site-footer a:hover { color: var(--gold); }

.footer-links { display: flex; gap: var(--space-lg); }

/* --- Login Page --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  padding: var(--space-xl);
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.login-card__header {
  background: var(--navy-deep);
  padding: var(--space-xl) var(--space-2xl);
  text-align: center;
  border-bottom: 3px solid var(--gold);
}

.login-card__header h2 {
  color: #fff;
  font-size: 1.2rem;
  margin-top: var(--space-sm);
}

.login-card__header p {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  margin-top: var(--space-xs);
}

.login-card__body {
  padding: var(--space-2xl);
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: all var(--duration) var(--ease);
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

.form-input::placeholder { color: var(--text-muted); }

.form-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: var(--space-xs);
  display: none;
}

.form-input--error { border-color: var(--error); }

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-checkbox input { accent-color: var(--navy); }

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

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6368' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* --- Alerts --- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.alert--success { background: var(--success-bg); color: var(--success); border-left: 3px solid var(--success); }
.alert--error   { background: var(--error-bg);   color: var(--error);   border-left: 3px solid var(--error); }
.alert--warning { background: var(--warning-bg); color: var(--warning); border-left: 3px solid var(--warning); }
.alert--info    { background: var(--info-bg);     color: var(--info);    border-left: 3px solid var(--info); }

/* =======================================================
   PANEL — Private Area
   ======================================================= */
.panel-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.panel-sidebar {
  background: var(--navy-deep);
  padding: var(--space-lg) 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.panel-sidebar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-xl);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.panel-sidebar__logo span {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gold-light);
}

.panel-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-sm);
}

.panel-nav__section {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: var(--space-lg) var(--space-md) var(--space-sm);
}

.panel-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.55rem var(--space-md);
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.panel-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.panel-nav a.active {
  color: var(--gold-light);
  background: rgba(196,154,60,0.12);
}

.panel-nav a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.panel-sidebar__footer {
  padding: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
}

.panel-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.panel-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.panel-user__info {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  overflow: hidden;
}

.panel-user__name {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-user__role {
  font-size: 0.72rem;
  color: var(--gold-light);
}

/* Panel Main */
.panel-main {
  background: var(--bg);
  overflow-y: auto;
}

.panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-2xl);
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-topbar h1 {
  font-size: 1.35rem;
}

.panel-topbar__actions { display: flex; gap: var(--space-sm); align-items: center; }

.panel-content {
  padding: var(--space-2xl);
}

/* Panel Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-card__icon--blue    { background: var(--info-bg);    color: var(--info); }
.stat-card__icon--green   { background: var(--success-bg); color: var(--success); }
.stat-card__icon--gold    { background: var(--gold-pale);  color: var(--gold); }
.stat-card__icon--warning { background: var(--warning-bg); color: var(--warning); }

.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1;
}

.stat-card__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Data tables */
.data-table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.data-table-header h3 { font-size: 1rem; }

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

.data-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-alt);
}

.data-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--surface-alt); }

/* Badges / Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.badge--green   { background: var(--success-bg); color: var(--success); }
.badge--red     { background: var(--error-bg);   color: var(--error); }
.badge--yellow  { background: var(--warning-bg); color: var(--warning); }
.badge--blue    { background: var(--info-bg);    color: var(--info); }
.badge--gray    { background: #eee; color: var(--text-muted); }

/* Notice cards in panel */
.notice-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border-left: 3px solid var(--border);
}

.notice-card--alta    { border-left-color: var(--error); }
.notice-card--media   { border-left-color: var(--warning); }
.notice-card--baja    { border-left-color: var(--info); }

.notice-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.notice-card h4 { font-size: 0.95rem; }

.notice-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notice-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state p { font-size: 0.9rem; }

/* --- Mobile sidebar toggle --- */
.panel-sidebar-toggle {
  display: none;
  background: var(--navy-deep);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

.panel-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 49;
}

/* --- Toast notifications --- */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: slideInRight 0.3s var(--ease);
  max-width: 360px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,27,45,0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  animation: fadeIn 0.2s var(--ease);
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.25s var(--ease);
}

@keyframes fadeIn  { from { opacity: 0; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } }

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.modal__header h3 { font-size: 1.1rem; }

.modal__close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.modal__close:hover { color: var(--text); background: var(--surface-alt); }

.modal__body { padding: var(--space-xl); }

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-light);
}

/* --- Loading spinner --- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: inherit;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { gap: var(--space-xl); }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .menu-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-xs);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s var(--ease);
    z-index: 99;
    border-bottom: 2px solid var(--gold);
  }
  .site-nav.open { transform: translateY(0); opacity: 1; }
  .site-nav a { padding: 0.6rem var(--space-md); }

  /* Grids */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero { padding: var(--space-2xl) 0; }
  .hero__stats { flex-direction: column; gap: var(--space-lg); }

  /* Panel */
  .panel-layout { grid-template-columns: 1fr; }
  .panel-sidebar {
    position: fixed;
    left: -280px;
    top: 0; bottom: 0;
    width: 260px;
    z-index: 50;
    transition: left 0.3s var(--ease);
  }
  .panel-sidebar.open { left: 0; }
  .panel-sidebar-overlay.active { display: block; }
  .panel-sidebar-toggle { display: flex; }

  .panel-content { padding: var(--space-lg); }
  .panel-topbar { padding: var(--space-md) var(--space-lg); }

  .data-table-wrapper { overflow-x: auto; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .panel-sidebar, .panel-topbar, .btn { display: none !important; }
  body { background: #fff; }
  .panel-layout { grid-template-columns: 1fr; }
}
