/* Sol Calendar (77EZ) Theme & Components */

:root {
  /* Palette */
  --bg: #06060B;
  --panel: #0A0B12;
  --panel2: #080912;
  --text: #F3F5FF;
  --muted: #A7AFC7;
  --line: rgba(255, 255, 255, 0.09);

  /* 77EZ Luxury */
  --gold: #E7C26A;
  --gold2: #B88B2F;
  --purple: #A88CFF;
  --purple2: #6E49FF;
  --white: #F7F8FF;
  --silver: #C9D0E6;

  --accent: var(--gold);
  --accent2: var(--purple);
  --danger: #FF7E9E;

  --shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
  --r: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: linear-gradient(
    180deg,
    #04040B 0%,
    #06060B 60%,
    #030309 100%
  );
  overflow-x: hidden;
}

/* Layout */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 280px;
}

.brand h1 {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  color: rgba(230, 238, 249, 0.95);
}

.brand .sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.35;
}

.chiprow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.chip strong {
  color: var(--text);
  font-weight: 600;
}

.shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

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

/* Cards */
.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px 300px at 50% 0%,
    rgba(138, 230, 255, 0.08),
    transparent 80%
  );
  pointer-events: none;
  border-radius: var(--r);
}

.card .hd {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.body {
  padding: 16px;
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.tab:hover {
  border-color: rgba(138, 230, 255, 0.2);
}

.tab.active {
  color: var(--text);
  border-color: rgba(138, 230, 255, 0.35);
  background: linear-gradient(
    180deg,
    rgba(138, 230, 255, 0.12),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 0 0 4px rgba(138, 230, 255, 0.05);
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 10px;
  border-radius: 12px;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(138, 230, 255, 0.35);
  box-shadow: 0 0 0 4px rgba(138, 230, 255, 0.1);
}

input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0px);
}

.btn.primary {
  border-color: rgba(138, 230, 255, 0.35);
  background: linear-gradient(
    180deg,
    rgba(138, 230, 255, 0.14),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 0 0 2px rgba(138, 230, 255, 0.1);
}

.btn.primary:hover {
  box-shadow: 0 0 0 4px rgba(138, 230, 255, 0.15);
}

.btn.danger {
  border-color: rgba(255, 138, 163, 0.35);
  background: linear-gradient(
    180deg,
    rgba(255, 138, 163, 0.14),
    rgba(255, 255, 255, 0.02)
  );
}

.btn.danger:hover {
  border-color: rgba(255, 138, 163, 0.5);
}

/* Typography */
.mini {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Hero / Today View */
.hero {
  padding: 26px 22px 22px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(
    540px 320px at 60% 92%,
    rgba(201, 208, 230, 0.09),
    transparent 58%
  );
  filter: blur(14px);
  opacity: 0.85;
  pointer-events: none;
}

.hero * {
  position: relative;
}

.bigdate {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 10px 0;
}

.bigdate .mdy {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.bigdate .year {
  font-size: 20px;
  color: var(--muted);
  font-weight: 400;
}

.meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  opacity: 0.85;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--gold);
}

.dot2 {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--purple);
}

.dot3 {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--silver);
}

.dot4 {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--gold2);
}

/* Calendar Grid */
.grid13 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.grid13::-webkit-scrollbar {
  height: 10px;
}

.grid13::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.month {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 140px;
}

.month .mhd {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.month .mname {
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.month .mcap {
  font-size: 11px;
  color: var(--muted);
}

.month .mgrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 6px;
}

.dcell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
}

.dcell:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.dtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.dsub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9px;
  color: var(--muted);
  overflow: hidden;
}

.hdot {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--accent);
  flex-shrink: 0;
}

.dcell.has-holiday {
  border-color: var(--accent);
}

.dcell.today {
  background: linear-gradient(
    180deg,
    rgba(138, 230, 255, 0.2),
    rgba(138, 230, 255, 0.08)
  );
  border-color: rgba(138, 230, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(138, 230, 255, 0.1);
}

.tag {
  display: inline-block;
  padding: 3px 6px;
  background: rgba(231, 194, 106, 0.12);
  border: 1px solid rgba(231, 194, 106, 0.3);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.tag small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

/* Lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.evt {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.evt:last-child {
  border-bottom: none;
}

.evt .name {
  font-weight: 650;
  color: var(--text);
}

.evt .sub {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.evt .mini {
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.kbd {
  display: inline-block;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* Mobile polish */
@media (max-width: 520px) {
  .wrap {
    padding: 18px 12px 40px;
  }

  .bigdate .mdy {
    font-size: 24px;
  }

  .shell {
    gap: 12px;
  }

  .tab {
    font-size: 11px;
    padding: 8px 8px;
  }
}

/* Print */
@media print {
  body {
    background: white;
    color: black;
  }

  .card,
  .hero {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .btn {
    display: none;
  }
}

/* Advanced mode */
.advanced {
  display: none;
}

body[data-adv="1"] .advanced {
  display: block;
}

/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Scrollbar sizing */
.mgrid,
.ygrid {
  grid-template-columns: repeat(7, minmax(40px, 1fr));
}

.dcell {
  min-width: 0;
}

.dtop {
  font-size: 11px;
}

@media (max-width: 380px) {
  .mgrid,
  .ygrid {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
  }

  .dtop {
    font-size: 10px;
  }
}
