/* ================
   ClassFlow Suite - FRONT
   Global styles & responsive
=============== */

:root {
  --bp-sm: 600px;
  --bp-md: 900px;
  --c-bg: #fff;
  --c-muted: #f6f7f9;
  --c-border: #dfe3e8;
  --c-text: #1f2d3d;
  --c-subtle: #5c6b7a;
  --c-primary: #0073aa;
  --c-primary-600: #005f8a;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --space-2: 10px; --space-3: 14px; --space-4: 20px;
  --font: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

.m-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-4);
  font-family: var(--font);
  color: var(--c-text);
}
.m-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.btn--primary { background: var(--c-primary); color: #fff; border-color: transparent; }
.btn--primary:hover { background: var(--c-primary-600); }
.btn--sm { padding: 6px 10px; font-size: 13px; }

/* Tabs (jak w panelu nauczyciela tabele) */
.m-tabs__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: var(--space-2);
}
.m-tabs__link {
  padding: 10px 14px;
  background: #f1f3f5;
  border: 1px solid var(--c-border);
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  text-decoration: none;
  color: var(--c-text);
  font-weight: 600;
}
.m-tabs__link.is-active { background: #fff; }
.m-tabs__panel { display: none; }
.m-tabs__panel.is-active { display: block; }

/* Table (jak w panelach) */
.m-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.m-table th, .m-table td {
  border-bottom: 1px solid var(--c-border);
  padding: 10px 12px;
  text-align: left;
}
.m-table th { background: #f9fafb; font-weight: 700; }

/* Responsive: tabela → karty */
@media (max-width: var(--bp-sm)) {
  .m-table thead { display: none; }
  .m-table, .m-table tbody, .m-table tr, .m-table td { display: block; width: 100%; }
  .m-table tr {
    border: 1px solid var(--c-border);
    border-radius: 10px;
    margin-bottom: var(--space-3);
    background: #fff;
  }
  .m-table td {
    border: none;
    border-bottom: 1px solid var(--c-border);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    padding: 10px 12px;
  }
  .m-table td:last-child { border-bottom: none; }
  .m-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--c-subtle);
  }
  .m-table .col-lp { display: none; }
}

/* Form */
.m-form { display: grid; gap: var(--space-3); }
.m-field { display: grid; gap: 6px; }
.m-field label { font-weight: 600; color: var(--c-subtle); }
.m-input, .m-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
}

/* Modal (zmiana grupy) */
.m-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; }
.m-modal.is-open { display: block; }
.m-modal__box {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: var(--radius);
  width: min(90%, 400px);
}


.metro-tabs { display:flex; gap:8px; margin:12px 0 16px }
.metro-tabs .tab-btn { border:1px solid #d1d5db; background:#f8fafc; padding:8px 12px; border-radius:8px; cursor:pointer }
.metro-tabs .tab-btn.active { background:#fff; border-color:#3b82f6; color:#1f2937 }
.metro-info { background:#f1f5f9; border:1px solid #e2e8f0; padding:10px 12px; border-radius:8px; margin:10px 0 }
.step-title { font-weight:700; margin-bottom:6px; color:#475569 }
.muted { color:#6b7280; margin:0 0 8px }

body.classflow-system-page {
  margin: 0;
  background: #cfcfcf;
  color: #3f3f3f;
}

.classflow-system-page-shell {
  min-height: 100vh;
  background: #cfcfcf;
}

.classflow-system-hero {
  position: relative;
  min-height: 300px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 72px 24px 92px;
  background: #2f3336;
  color: #fff;
}

.classflow-system-hero::after {
  content: "";
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: -64px;
  height: 112px;
  background: #cfcfcf;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.classflow-system-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 48px));
  text-align: center;
}

.classflow-system-hero h1 {
  margin: 0;
  color: #fff;
  font-size: 112px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.classflow-system-content {
  box-sizing: border-box;
  padding: 44px 24px 120px;
}

.classflow-system-inner {
  width: min(1220px, 100%);
  margin: 0 auto;
}

.classflow-system-inner-profile {
  width: min(1000px, 100%);
}

.classflow-system-page-teacher-panel .classflow-system-content {
  padding-left: 32px;
  padding-right: 32px;
}

.classflow-system-page-teacher-panel .classflow-system-inner {
  width: 100%;
  max-width: none;
}

.classflow-system-page-teacher-panel .classflow-system-hero h1 {
  font-size: clamp(56px, 7vw, 112px);
}

.classflow-system-divider {
  width: 100%;
  height: 1px;
  margin: 38px 0;
  border: 0;
  background: #3f3f3f;
}

.classflow-system-notice {
  box-sizing: border-box;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.classflow-system-notice-error {
  background: #ffe5e5;
  color: #7a1f1f;
}

.classflow-login-wrap {
  width: min(920px, 100%);
  margin: 0 auto;
}

.classflow-login-form {
  display: grid;
  gap: 22px;
}

.classflow-login-form label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #777;
  font-size: 13px;
  font-weight: 700;
}

.classflow-login-form input[type="text"],
.classflow-login-form input[type="password"] {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #4d4d4d;
  background: transparent;
  color: #333;
  padding: 8px 10px;
  font-size: 16px;
}

.classflow-login-lost {
  width: max-content;
  color: #1084bd;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.classflow-login-lost:hover,
.classflow-login-lost:focus {
  text-decoration: underline;
}

.classflow-login-remember {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  margin-top: 26px;
  color: #888;
  font-size: 16px !important;
}

.classflow-login-remember input {
  width: 20px;
  height: 20px;
}

.classflow-login-form button {
  justify-self: start;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 3px;
  background: #f4f4f4;
  color: #777;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.classflow-login-form button:hover,
.classflow-login-form button:focus {
  background: #fff;
  color: #333;
}

.classflow-login-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e69a9a;
  border-radius: 6px;
  background: #ffe5e5;
  color: #7a1f1f;
  font-weight: 700;
}

.classflow-login-message {
  color: #777;
  font-size: 24px;
  line-height: 1.4;
}

.classflow-login-message a {
  color: #1084bd;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .classflow-system-hero {
    min-height: 250px;
    padding: 64px 20px 84px;
  }

  .classflow-system-hero h1 {
    font-size: 84px;
  }
}

@media (max-width: 600px) {
  .classflow-system-hero {
    min-height: 200px;
    padding: 54px 16px 72px;
  }

  .classflow-system-hero-inner {
    width: 100%;
  }

  .classflow-system-hero h1 {
    font-size: 54px;
  }

  .classflow-system-content {
    padding: 28px 14px 80px;
  }
}
