/* public/assets/app.css
   Theme & App Styles (Basis: ITESP Green)
*/

/* =====================================================
   RESET & BASIS
===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #7bb062;
  --primary-dark: #6fa958;

  --text: #222;
  --gray: #666;

  --bg: #f8f8f8;
  --light-bg: #f0f4ed;
  --white: #ffffff;

  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);

  /* App spezifisch */
  --card-radius: 16px;

  /* Bootstrap Farb-/Theme-Overrides (Bootstrap 5 nutzt CSS-Variablen) */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 123, 176, 98;
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-dark);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-border-radius: var(--radius);
  --bs-border-radius-lg: calc(var(--radius) + 2px);
}

html,
body {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

main {
  flex: 1; /* sorgt dafür, dass der Footer unten bleibt */
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container (kompatibel zu Bootstrap .container) */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding-left: 12px;
  padding-right: 12px;
}

.page {
  padding: 22px 0;
}

/* =====================================================
   HEADER
===================================================== */

.site-header {
  background: var(--white);
  padding: 12px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(123, 176, 98, 0.28), rgba(123, 176, 98, 0.12));
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.logo-mark {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  font-weight: 800;
  font-size: 1.15rem;
}

.logo-subtitle {
  font-size: 0.85rem;
  color: var(--gray);
}

/* Navigation Desktop */

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  align-items: center;
}

.main-nav a {
  color: var(--text);
  font-weight: 700;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.main-nav a.active {
  color: var(--primary);
  font-weight: 800;
}

/* Mobile Toggle */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
}

/* Dropdown (Plan + User) via <details> */

.nav-dropdown details,
.user-menu {
  position: relative;
}

.nav-dropdown summary,
.user-menu summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  user-select: none;
}

.nav-dropdown summary::-webkit-details-marker,
.user-menu summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary:hover,
.user-menu summary:hover {
  color: var(--primary);
}

.dropdown-panel,
.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px;
  display: none;
  z-index: 3000;
}

.nav-dropdown details[open] .dropdown-panel,
.user-menu[open] .user-menu-panel {
  display: grid;
  gap: 6px;
}

.dropdown-panel a,
.user-menu-panel a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
}

.dropdown-panel a:hover,
.user-menu-panel a:hover {
  background: rgba(123, 176, 98, 0.12);
  text-decoration: none;
}

.user-menu-panel a.danger {
  color: #b42318;
}

.user-menu-panel a.danger:hover {
  background: rgba(180, 35, 24, 0.08);
}

/* =====================================================
   BUTTONS (Bootstrap-kompatibel)
===================================================== */

.btn {
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-weight: 800;
  transition: 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  gap: 8px;
}

.btn:hover {
  text-decoration: none;
}

/* Größen */
.btn-sm {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1.1rem;
}

/* Variants */
.btn-primary,
.btn-success {
  background: var(--primary);
  color: var(--white) !important;
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--primary-dark);
  color: var(--white) !important;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary) !important;
  border-color: rgba(123, 176, 98, 0.45);
}

.btn-outline-primary:hover {
  background: rgba(123, 176, 98, 0.12);
  border-color: rgba(123, 176, 98, 0.6);
}

.btn-outline-secondary,
.btn-secondary {
  background: #eee;
  color: var(--text) !important;
  border-color: rgba(0, 0, 0, 0.06);
}

.btn-outline-secondary:hover,
.btn-secondary:hover {
  background: #ddd;
}

.btn-outline-success {
  background: transparent;
  color: var(--primary) !important;
  border-color: rgba(123, 176, 98, 0.45);
}

.btn-outline-success:hover {
  background: rgba(123, 176, 98, 0.12);
  border-color: rgba(123, 176, 98, 0.6);
}

.btn-danger {
  background: #dc3545;
  color: var(--white) !important;
}

.btn-danger:hover {
  background: #b02a37;
}

.btn-outline-danger {
  background: transparent;
  color: #dc3545 !important;
  border-color: rgba(220, 53, 69, 0.45);
}

.btn-outline-danger:hover {
  background: rgba(220, 53, 69, 0.08);
}

.btn-link {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 800;
  color: var(--primary) !important;
}

/* Header CTA */
.nav-cta {
  background: var(--primary);
  color: #fff !important;
}

.nav-cta:hover {
  background: var(--primary-dark);
  color: #fff !important;
}

/* =====================================================
   HERO / SECTIONS (optional – nutzbar für Landing/Login)
===================================================== */

.hero-simple {
  padding: 60px 0 40px;
  background: linear-gradient(135deg, #f5faf1, var(--bg));
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-simple h1 {
  font-size: 2.1rem;
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero-simple p {
  max-width: 560px;
  margin-bottom: 14px;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: 60px 0;
  background: var(--white);
}

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

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

/* =====================================================
   CARDS / FORMS (App-Look)
===================================================== */

.card {
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-header {
  background: rgba(0, 0, 0, 0.03);
  border-top-left-radius: var(--card-radius) !important;
  border-top-right-radius: var(--card-radius) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-control,
.form-select {
  border-radius: var(--radius) !important;
}

.alert {
  border-radius: var(--radius);
}

/* =====================================================
   TASKS / PLANNER SPEZIFISCH
===================================================== */

.task-chip {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  margin-bottom: 0.35rem;
  text-decoration: none;
  color: inherit;
}

.task-chip:hover {
  background: rgba(123, 176, 98, 0.10);
  border-color: rgba(123, 176, 98, 0.35);
}

.task-time {
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.55);
  margin-right: 0.35rem;
}

.day-hero {
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(123, 176, 98, 0.18), rgba(111, 169, 88, 0.10));
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.calendar-table td {
  vertical-align: top;
  height: 120px;
  padding: 0.35rem;
}

.cal-daynum {
  font-size: 0.85rem;
  font-weight: 800;
  opacity: 0.85;
}

.cal-muted {
  opacity: 0.45;
}

.cal-today {
  outline: 2px solid rgba(123, 176, 98, 0.45);
  border-radius: 12px;
}

/* =====================================================
   FOOTER
===================================================== */

.site-footer {
  background: #1c1c1c;
  color: var(--white);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 992px) {
  .calendar-table td {
    height: auto;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 10px;
    background: var(--white);
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 2000;
    min-width: 240px;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .dropdown-panel,
  .user-menu-panel {
    position: static;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
  }
}
