/* ==========================================================================
   Province Practice v2 - Account & Modal (Clean Studio Style)
   ========================================================================== */

.account-dialog {
  max-width: 440px;
  width: min(440px, calc(100% - 24px));
  padding: 0;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16);
}

.account-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.auth-shell {
  padding: 24px 26px 28px;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.auth-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
}

.close-dialog {
  border: 0;
  background: #f1f5f9;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  color: #64748b;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.close-dialog:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.auth-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.auth-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 0 6px 10px;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
}

.auth-tabs button.active {
  color: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  font-weight: 650;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
}

.auth-form input:not([type=checkbox]) {
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  width: 100%;
  font-size: 13.5px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-form input:not([type=checkbox]):focus {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

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

.auth-check {
  display: flex;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
  gap: 8px;
  cursor: pointer;
}

.auth-check input {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--primary, #2563eb);
}

.auth-footnote {
  font-size: 11.5px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.auth-error {
  font-size: 12.5px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  white-space: pre-wrap;
}

.auth-notice {
  font-size: 12px;
  line-height: 1.6;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 12px;
  border-radius: 8px;
  color: #1e40af;
}

.privacy-details {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.6;
}

.privacy-details summary {
  cursor: pointer;
  color: var(--primary, #2563eb);
  font-weight: 500;
}

.auth-form .button {
  width: 100%;
  margin-top: 4px;
}

/* User Account Profile Panel */
.account-profile {
  padding: 24px;
}

.account-profile h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
}

.profile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.profile-fields > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.profile-fields small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 500;
}

.profile-fields strong {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.account-id {
  font-size: 12px;
  overflow-wrap: anywhere;
  color: #475569;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.6;
}

.profile-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Admin Dashboard */
.admin-head {
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.admin-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.admin-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

.admin-body {
  padding: 18px 22px;
}

.admin-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-search input {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  min-width: 0;
  flex: 1;
  font-size: 13px;
  background: #ffffff;
  outline: none;
}

.admin-search input:focus {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.student-list {
  display: grid;
  gap: 8px;
}

.student-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  transition: border-color 0.15s ease;
}

.student-card:hover {
  border-color: #cbd5e1;
}

.student-card h3 {
  font-size: 14.5px;
  font-weight: 650;
  color: #0f172a;
  margin: 0 0 2px;
}

.student-card p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
}

.student-numbers {
  display: flex;
  gap: 16px;
  align-items: center;
}

.student-numbers strong {
  display: block;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.student-numbers span {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  margin-top: 1px;
}

.admin-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 12px;
  color: #64748b;
}

.student-paper {
  display: flex;
  justify-content: space-between;
  padding: 10px 2px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
}

.cloud-sidebar-note {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f5f9;
}

.cloud-sidebar-note strong {
  display: block;
  color: #0f172a;
  font-weight: 650;
  margin-bottom: 1px;
}

/* Mobile Media Queries */
@media(max-width: 760px) {
  .profile-fields {
    grid-template-columns: 1fr;
  }
  .student-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .student-numbers {
    width: 100%;
    justify-content: space-between;
  }
}

@media(max-width: 560px) {
  .account-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 32px);
    overscroll-behavior: contain;
  }
  .auth-shell {
    padding: 20px;
  }
  .auth-form input:not([type=checkbox]) {
    height: 46px;
    font-size: 16px;
  }
  .auth-form .button, .auth-tabs button {
    min-height: 44px;
  }
  .close-dialog {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .profile-buttons .button {
    min-height: 44px;
    flex: 1 1 120px;
  }
  .admin-head, .admin-body {
    padding: 14px;
  }
  .admin-head {
    flex-wrap: wrap;
  }
  .admin-search input {
    height: 44px;
    font-size: 16px;
  }
  .account-profile {
    padding: 18px;
  }
  .auth-two {
    grid-template-columns: 1fr;
  }
}

.account-details {
  margin-top: 20px;
  font-size: 12px;
  color: #64748b;
}

.account-details summary {
  min-height: 32px;
  cursor: pointer;
}
.auth-link { width: fit-content; font-size: 12px; color: var(--primary); padding: 4px 0; text-align: left; }
.settings-form { max-width: 460px; }
.auth-form textarea,.auth-form select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--ink); background: var(--bg-card); font: inherit; resize: vertical; }
.auth-form textarea:focus,.auth-form select:focus { outline: 2px solid var(--primary-glow); border-color: var(--primary); }
.auth-form textarea { min-height: 130px; }
.account-profile { padding: 30px; }
.profile-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 600px; gap: 10px; }
.profile-buttons .button { min-height: 46px; }
.auth-shell { padding: 28px; }
.auth-form input:not([type=checkbox]) { height: 46px; border-radius: 10px; }
.auth-header { margin-bottom: 22px; }
.close-dialog { width: 40px; height: 40px; border-radius: 10px; }
@media(max-width:560px) {
 .auth-shell,.account-profile { padding: 20px; }
 .auth-link { min-height: 36px; }
 .auth-form textarea,.auth-form select { font-size: 16px; }
 .profile-buttons .button { padding: 10px; font-size: 12px; }
}
