/* ===============================
   ROOT VARIABLES
================================ */
:root {
  --color-primary: #0f4c81;
  --color-accent: #f25c05;
  --color-dark: #2f2f2f;
  --color-light: #f4f4f2;

  --radius: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  --border: 1px solid rgba(47, 47, 47, 0.12);
}

/* ===============================
   RESET & BASE
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Ubuntu, "Helvetica Neue", Arial, sans-serif;
  background: var(--color-light);
  color: var(--color-dark);
  line-height: 1.5;
}

/* ===============================
   LINKS & TEXT
================================ */
a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin-top: 0;
}

/* ===============================
   BUTTONS
================================ */
.btn,
button {
  appearance: none;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn.primary,
button.primary {
  background: var(--color-primary);
  color: #fff;
}

.btn.secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn.danger,
button.danger {
  background: #b00020;
  color: #fff;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
}

button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===============================
   AUTH PAGES (login / signup)
================================ */
.auth-container {
  max-width: 420px;
  margin: 10vh auto;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-container h1 {
  margin-bottom: 1rem;
}

.auth-container .subtitle {
  margin-bottom: 1.5rem;
  color: #666;
}

.auth-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ===============================
   FORMS
================================ */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  text-align: left;
  gap: 0.35rem;
}

input,
select,
textarea {
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  font-size: 0.9rem;
  background: #fff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14);
}

/* ===============================
   FEEDBACK TEXT
================================ */
.error {
  color: #b00020;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.info {
  color: var(--color-primary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.muted {
  font-size: 0.8rem;
  color: #666;
}

/* ===============================
   DASHBOARD (admin/marketing/pro)
================================ */
.dashboard {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
}

.dashboard section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  margin-bottom: 2rem;
  border: var(--border);
}

/* ===============================
   TABLES
================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead {
  background: var(--color-primary);
  color: #fff;
}

th,
td {
  padding: 0.6rem;
  text-align: left;
}

tbody tr:nth-child(even) {
  background: #f7f7f7;
}

tbody tr:hover {
  background: #eef3f8;
}

/* ===============================
   ASSIGNMENTS LIST
================================ */
#assignmentList {
  margin-top: 1rem;
  padding-left: 1rem;
}

#assignmentList li {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

/* ===============================
   MODAL (Marketing / Pro shared style)
================================ */
body.modal-open {
  overflow: hidden;
}

.mm {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.mm.is-open {
  display: block;
}

.mm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.mm-dialog {
  position: relative;
  max-width: 980px;
  margin: 4vh auto;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: var(--border);
}

.mm-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem 1rem;
  border-bottom: var(--border);
}

.mm-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.mm-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mm-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 47, 47, 0.18);
  background: #f7f7f7;
  white-space: nowrap;
}

.mm-badge.approved {
  border-color: rgba(26, 127, 55, 0.35);
  background: rgba(26, 127, 55, 0.1);
  color: #1a7f37;
}

.mm-badge.needs-revision {
  border-color: rgba(242, 92, 5, 0.45);
  background: rgba(242, 92, 5, 0.1);
  color: #b94800;
}

.mm-badge.not-approved {
  border-color: rgba(176, 0, 32, 0.35);
  background: rgba(176, 0, 32, 0.08);
  color: #b00020;
}

.mm-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(47, 47, 47, 0.12);
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.mm-close:hover {
  background: #f3f5f7;
}

.mm-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  padding: 1rem;
}

.mm-media {
  border: var(--border);
  border-radius: 10px;
  background: #fafafa;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.mm-media img,
.mm-media video {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  display: block;
  background: #000;
}

.mm-media .mm-media-empty {
  color: #666;
  font-size: 0.9rem;
  padding: 1rem;
  text-align: center;
}

.mm-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mm-meta {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: var(--border);
  border-radius: 10px;
  background: #fff;
}

.mm-meta strong {
  font-size: 0.85rem;
}

.mm-meta p {
  margin: 0;
  font-size: 0.85rem;
  color: #444;
  white-space: pre-wrap;
}

.mm-form {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.mm-footer {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.9rem 1rem 1rem 1rem;
  border-top: var(--border);
  background: #fff;
}

.mm-inline-error {
  color: #b00020;
  font-size: 0.85rem;
  margin: 0;
  padding: 0 1rem 0.5rem 1rem;
}

.mm-loading {
  padding: 1rem;
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .mm-dialog {
    margin: 0;
    border-radius: 0;
    max-width: 100%;
    height: 100%;
    overflow: auto;
  }

  .mm-body {
    grid-template-columns: 1fr;
  }

  .mm-media img,
  .mm-media video {
    max-height: 42vh;
  }
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 600px) {
  .auth-container {
    margin: 2rem 1rem;
  }

  table {
    font-size: 0.75rem;
  }

  th,
  td {
    padding: 0.4rem;
  }
}