
/* Theme Variables */
:root {
  /* Colors - Light Theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f1f1;
  --bg-hover: #f5f5f5;
  --bg-card: #fbfbfb;
  
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-tertiary: #555555;
  --text-muted: #666666;
  --text-light: #888888;
  
  --border-color: #eee;
  --border-color-dark: #ddd;
  --border-color-light: #ccc;
  
  --accent-color: #881400;
  --accent-hover: #a01800;
  
  --link-color: gray;
  --link-hover: #000;
  
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-heavy: rgba(0, 0, 0, 0.15);
  
  --input-bg: #ffffff;
  --input-border: #ccc;
  
  /* Status colors */
  --success-bg: #d4edda;
  --success-text: #155724;
  --info-bg: #cce5ff;
  --text-info: #004085;
  --warning-bg: #ffe5cc;
  --warning-text: #a14e00;
  --error-color: #dc3545;

  --warning-bg: #fff3cd;
  --warning-text: #856404;

  /* question types colors */
  --freetext-color-bg: #d4edda;
  --freetext-color: #155724;
  --file-color-bg: #ffe5cc;
  --file-color: #a14e00;
  --yes-no-color-bg: #b739de;
  --yes-no-color: #ffffff;
  --scale-color-bg: #3b82f6;
  --scale-color: #ffffff;
  --date-color-bg: #10b981;
  --date-color: #ffffff;
  --multiple-choice-color-bg: #f59e0b;
  --multiple-choice-color: #ffffff;
  --resources-color-bg: #8b5cf6;
  --resources-color: #ffffff;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #121212;
  --bg-hover: #2e2e2e;
  --bg-card: #1e1e1e;
  
  --text-primary: #e8e8e8;
  --text-secondary: #d0d0d0;
  --text-tertiary: #b0b0b0;
  --text-muted: #909090;
  --text-light: #707070;
  
  --border-color: #333333;
  --border-color-dark: #444444;
  --border-color-light: #555555;
  
  --accent-color: #e63946;
  --accent-hover: #ff4d5a;
  
  --link-color: #a0a0a0;
  --link-hover: #e8e8e8;
  
  --shadow-color: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
  
  --input-bg: #2a2a2a;
  --input-border: #444444;
  
  /* Status colors */
  --success-bg: #1e3a1e;
  --success-text: #90ee90;
  --info-bg: #1e3a3a;
  --text-info: #78c7ff;
  --warning-bg: #3a2e1e;
  --warning-text: #ffc078;
  --error-color: #ff6b6b;

  --warning-bg: #3a2e1e;
  --warning-text: #ffdd57;

  /* question types colors */
  --freetext-color-bg: #1e3a1e;
  --freetext-color: #90ee90;
  --file-color-bg: #3a2e1e;
  --file-color: #ffc078;
  --yes-no-color-bg: #7a39de;
  --yes-no-color: #ffffff;
  --scale-color-bg: #2563eb;
  --scale-color: #ffffff;
  --date-color-bg: #059669;
  --date-color: #ffffff;
  --multiple-choice-color-bg: #d97706;
  --multiple-choice-color: #ffffff;
  --resources-color-bg: #7c3aed;
  --resources-color: #ffffff;
}

/* General styles */

body {
  padding: 0;
  margin: 0;

  font-family: "Open Sans", sans-serif;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

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

.logo {
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  border-radius: 4px;
  background-color: var(--accent-color);
}

.clickable {
  cursor: pointer;
}

/* Banner styles */

.banner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

  color: var(--text-primary);
  padding: 10px 50px;
}

.banner h1 {
  margin: 0;
  padding: 0;
  font-size: 24px;
}

.banner .title {
  min-width: 100px;
}

.banner .left-section {
  display: flex;
  align-items: center;
  gap: 30px;
}

.banner .right-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.banner p {
  margin: 0;
  font-size: 16px;
}

.banner nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner nav a {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.banner nav a i {
  font-size: 16px;
}

.banner nav a:hover {
  color: var(--link-color);
  background-color: var(--bg-secondary);
}

.banner nav a.active {
  color: var(--link-color);
  background-color: var(--bg-secondary);
}

.add-user-form {
  margin: 10px;
}

icon {
  display: inline;
  cursor: pointer;
  font-weight: normal;
}

footer {
    text-align: center;
    background-color: var(--bg-tertiary);
    color: var(--text-tertiary);
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}

.row-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

/* Flash message styles */

.flash {
  position: fixed;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  top: 20px;

  left: 50%;
  transform: translateX(-50%);

  padding: 10px 30px;
  
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

  font-size: 12pt;
  font-weight: bold;

  animation-name: slideDown, slideUp;
  animation-duration: 0.5s, 0.5s;
  animation-timing-function: ease-out, ease-in;
  animation-delay: 0s, 4s;
  animation-fill-mode: forwards, forwards;
}

.flash p {
  margin: 0;
  padding: 0;
}

@keyframes slideDown {
  0% {
    top: -20px;
  }
  100% {
    top: 20px;
  }
}

@keyframes slideUp {
  0% {
    top: 20px;
    opacity: 1;
  }
  100% {
    top: -100px;
    opacity: 0;
  }
}

.flash.error {
  background-color: rgb(255, 78, 78);
  color: white;
}

.flash.success {
  background-color: rgb(65, 174, 86);
  color: white;
}

.flash.info {
  background-color: rgb(78, 156, 255);
  color: white;
}

/* Profile form styles */
.profile-form {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.profile-form h3 {
  margin-top: 20px;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color-dark);
}

.profile-form .hint {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

/* Quizz Tables */
.quizz-table,
.participants-table,
.attempts-table {
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-card);
  box-shadow: 0 1px 3px var(--shadow-color);
  border-radius: 8px;
  overflow: hidden;
}


.quizz-table th,
.quizz-table td,
.participants-table th,
.participants-table td,
.attempts-table th,
.attempts-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);

  text-align: left;
}

.quizz-table th,
.participants-table th,
.attempts-table th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
}


.quizz-table tr:hover,
.participants-table tr:hover,
.attempts-table tr:hover {
  background-color: var(--bg-hover);
}

/* Button System - Base Class */
.btn {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  width: fit-content;
  transition: all 0.2s ease;
}

.btn i {
  font-size: 16px;
}

.btn.large {
  width: 100%; 
}

/* Button Types - Colors */
.btn-create {
  background-color: #28a745;
  color: white;
}

.btn-create:hover {
  background-color: #1e7e34;
  color: white;
}

.btn-edit {
  background-color: #007bff;
  color: white;
}

.btn-edit:hover {
  background-color: #0056b3;
  color: white;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #c82333;
  color: white;
}

.btn-neutral {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-dark);
}

.btn-neutral:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* Button Variant - Quiet (for tables, lists) */
.btn-quiet {
  background: none;
  color: var(--text-muted);
}

.btn-quiet.btn-create:hover {
  background: #e5ffe5;
  color: #28a745;
}

.btn-quiet.btn-edit:hover {
  background: #e5f0ff;
  color: #0066cc;
}

.btn-quiet.btn-delete:hover {
  background: #ffe5e5;
  color: #dc3545;
}

/* Button Variant - Back link */
.btn-link {
  background: none;
  padding: 0;
  color: var(--text-muted);
  font-weight: bold;
}

.btn-link:hover {
  color: var(--text-primary);
  background: none;
}

.empty-message {
  color: var(--text-muted);
  font-style: italic;
  padding: 20px;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin: 20px 0;
}

/* page layout styles */

.content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 20px;
  padding: 0px 10%;
  flex-grow: 1;
  min-height: 100vh;
}


header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

header > .title-band {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

header > .title-band > .right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

header > .title-band > .left {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
}



header > .description {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 10px 20px;
}

.bipart-band {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.quizz-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* Questions List */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

/* Quizz List (User Dashboard) */
.quizz-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.quizz-card {
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 3px 8px var(--shadow-heavy);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}


.quizz-card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  width: 60%;
}

.quizz-card-content .quizz-progress {
  margin-top: 10px;
  margin-bottom: 0px;
  font-size: 12pt;
  font-weight: normal;
}

.quizz-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.quizz-description {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background-color: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #34c759);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.quizz-start-btn, .quizz-replay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  padding: 20px 30px;
  min-width: 120px;
  position: relative;
  clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%);
  margin-left: -10px;
  transition: background-color 0.2s ease, min-width 0.2s ease;
  cursor: pointer;
}

.quizz-replay-btn {
  background-color: #e18d06;
}

.quizz-start-btn:hover {
  background-color: #1e7e34;
  color: white;
  min-width: 160px;
}

.quizz-replay-btn:hover {
  background-color: #b36b05;
  color: white;
  min-width: 160px;
}


.quizz-start-btn i, .quizz-replay-btn i {
  font-size: 32px;
}

.quizz-start-btn span, .quizz-replay-btn span {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.quizz-view-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  padding: 20px 30px;
  min-width: 120px;
  position: relative;
  clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%);
  margin-left: -10px;
  transition: background-color 0.2s ease, min-width 0.2s ease;
  cursor: pointer;
}

.quizz-view-btn:hover {
  background-color: #0056b3;
  color: white;
  min-width: 160px;
}

.quizz-view-btn i {
  font-size: 32px;
}

.quizz-view-btn span {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.quizz-card-completed {
  border-left: 4px solid #28a745;
}

.attempt-info {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.attempt-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.attempt-info i {
  font-size: 16px;
}

.question-card {
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow-color);
  overflow: hidden;
}

.question-header{
  background: var(--bg-secondary);
  padding: 10px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.question-header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.question-header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

td .actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 10px;
}

.question-optional {
  font-style: italic;
  font-size: 12px;
  color: var(--text-light);
}

/* Badge System - Base Class */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  width: fit-content;
}

.badge i {
  font-size: 14px;
}

/* Badge Types */
.badge-status {
  justify-content: space-between;
}

.badge-file-type {
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.badge-question {
  /* inherits base styles */
}

.badge-answer {
  /* inherits base styles */
}

/* Badge Variants - Colors */
.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-info {
  background: var(--info-bg);
  color: var(--text-info);
}

.badge-success.badge-solid {
  background: #28a745;
  color: white;
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge-warning.badge-solid {
  background: #ffc107;
  color: #333;
}

.badge-neutral {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.badge-muted {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.badge-accent {
  background: var(--accent-color);
  color: white;
}

/* specific badges */

.badge-file-type.freetext {
  background-color: var(--freetext-color-bg);
  color: var(--freetext-color);
}

.badge-file-type.file {
  background-color: var(--file-color-bg);
  color: var(--file-color);
}

.badge-file-type.yesno {
  background-color: var(--yes-no-color-bg);
  color: var(--yes-no-color);
}

.badge-file-type.scale {
  background-color: var(--scale-color-bg);
  color: var(--scale-color);
}

.badge-file-type.date {
  background-color: var(--date-color-bg);
  color: var(--date-color);
}

.badge-file-type.multiple-choice {
  background-color: var(--multiple-choice-color-bg);
  color: var(--multiple-choice-color);
}

.badge-file-type.resources {
  background-color: var(--resources-color-bg);
  color: var(--resources-color);
}

.question-content {
  display: flex;
  flex-direction: column;
  padding: 15px;
}

.question-content h3 {
  margin: 0 0 10px 0;
}

.question-desc {
  color: var(--text-muted);
  margin: 0 0 15px 0;
}

.question-params {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-params .param {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.question-params .param i {
  color: var(--accent-color);
}

.question-actions {
  align-self: flex-end;
  width: fit-content;
  display: flex;
  gap: 10px;
  margin-top: 0px;
}

/* Questions Header */
.questions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.questions-header h2 {
  margin: 0;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  border: none;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 200px;
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-heavy);
  z-index: 1000;
  overflow: hidden;
  margin-top: 0px;
  border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: var(--bg-hover);
  color: var(--accent-color);
}

.dropdown-item i {
  font-size: 16px;
}

.dropdown-kebab .dropdown-toggle {
  background: none;
  padding: 8px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-muted);
}

.dropdown-kebab .dropdown-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item-danger {
  color: #dc3545;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.dropdown-item-danger:hover {
  background-color: #ffe5e5 !important;
  color: #dc3545 !important;
}

.subtitle-bar {
  display: flex;
  flex-direction: row;

  align-items: center;
  gap: 25px;
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 2px solid var(--border-color-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-size: 18px;
}

.theme-toggle:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: rotate(15deg);
}

.theme-toggle i {
  transition: transform 0.3s ease;
}

/* Hide/show icons based on theme */
.theme-toggle .ri-sun-line {
  display: none;
}

.theme-toggle .ri-moon-line {
  display: block;
}

[data-theme="dark"] .theme-toggle .ri-sun-line {
  display: block;
}

[data-theme="dark"] .theme-toggle .ri-moon-line {
  display: none;
}

/* User info section in banner */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info p {
  margin: 0;
}

.user-info a {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* File Type Cards for question creator */
.file-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin: 15px 0;
}

.file-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 10px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.file-type-card i {
  font-size: 28px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.file-type-card span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.file-type-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-color-dark);
  transform: translateY(-2px);
}

.file-type-card:hover i {
  color: var(--accent-color);
}

.file-type-card.selected {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.file-type-card.selected i,
.file-type-card.selected span {
  color: white;
}

.file-type-card.selected:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.file-type-card.selected:hover i {
  color: white;
}

/* File Type Badges (display mode) */
.file-types-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Customer detail styles */

.detail-section {
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow-color);
  padding: 20px;
  margin-bottom: 20px;
}

.detail-section h3 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-size: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.detail-item span {
  font-size: 14px;
  color: var(--text-primary);
}

.quizz-list {
  list-style: none;
  padding: 15px 0;
  margin: 0;
  margin-bottom: 40px;
}

.quizz-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.quizz-list li:last-child {
  border-bottom: none;
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 12px;
  flex-shrink: 0;
}

.card-icon i {
  font-size: 1.75rem;
  color: white;
}

.card-content h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}

.card-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Attempt Question Page */
.attempt-container {
  max-width: 800px;
  margin: 0 auto;
}

.attempt-progress {
  margin-bottom: 30px;
}

.attempt-progress .progress-bar {
  height: 8px;
  margin-bottom: 15px;
}

.progress-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.step-completed {
  background-color: #28a745;
  color: white;
}

.step-current {
  background-color: var(--accent-color);
  color: white;
  transform: scale(1.1);
}

.step-pending {
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
}

.progress-indicator {
  font-size: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  background-color: var(--bg-tertiary);
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.question-container {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow-color);
  overflow: hidden;
}

.question-header-attempt {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.question-header-attempt .question-number {
  font-weight: 600;
  color: var(--text-primary);
}

.question-content-attempt {
  padding: 25px;
}

.question-content-attempt .question-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.question-content-attempt .question-description {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.answer-form {
  padding: 0 25px 25px;
}

.answer-input {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

.answer-input .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-input label {
  font-weight: 600;
  color: var(--text-secondary);
}

.answer-input textarea{
  padding: 12px 15px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s ease;
}


.answer-input textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.upload-area > label {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  border: 2px dashed var(--border-color-dark);
  text-align: center;
  padding-top: 20px;

  cursor: pointer;
}

.upload-area.dragover > label {
  background: var(--bg-hover);
  border-color: var(--accent-color);
}

.upload-area > label > i {
  font-size: 32pt;
  color: var(--text-muted);
}

.upload-area > label > p {
  max-width: 60%;
}

.uploaded-files {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  max-width: 100%;
  width: fit-content;
  box-sizing: border-box;
  overflow-x: scroll;
}

.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-tertiary);
  padding: 7px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  overflow: visible;
}

.file-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.delete-file-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 25px;
  height: 25px;
  border: none;
  border-radius: 50%;
  background-color: var(--border-color-dark);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s;
  z-index: 10;
}

.delete-file-btn i {
  font-size: 14px;
  line-height: 1;
  font-weight: bold;
}

.file-card:hover .delete-file-btn {
  opacity: 1;
}

.delete-file-btn:hover {
  background-color: rgba(255, 59, 48, 1);
  color: white;
}

.file-card .miniature {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  height: 80px;
  border-radius: 6px;
  background-color: var(--bg-secondary);
  background-size: cover;
  background-position: center;
}

.file-card .miniature i {
  font-size: 36px;
  color: var(--text-primary);
  line-height: 80px;
}

.file-card .miniature .progress {
  position: absolute;
  display: none;
  width: 50%;
  height: 50%;
  --p: 0%;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: conic-gradient(
        var(--text-light) 0% var(--p),
        var(--bg-secondary) var(--p) 100%
    );
}

@keyframes loading-anim {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 200% 0%;
  } 
}

.file-card .miniature.loading {
  animation: loading-anim 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #AAA, #555, #AAA);
  background-size: 200% 100%;
}

.file-card .name {
  font-size: 12px;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 70px;
}

input[type='file'] {
  display: none;
}

.char-counter {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.file-types-allowed {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.file-ext {
  font-weight: 600;
  color: var(--text-secondary);
}

.existing-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 15px;
  background: var(--success-bg);
  color: var(--success-text);
  border-radius: 8px;
  font-size: 13px;
}

.existing-file a {
  color: var(--success-text);
  text-decoration: underline;
}

.form-actions {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.btn-nav-placeholder {
  width: 120px;
}

/* Answers List */
.answers-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.answer-card {
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow-color);
  overflow: hidden;
}

.answer-header {
  background: var(--bg-secondary);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.answer-header-left, .answer-header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.answer-number {
  font-weight: 600;
  color: var(--text-secondary);
}

.answer-content {
  padding: 15px 20px;
}

.answer-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.answer-desc {
  margin: 0 0 15px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.answer-response {
  margin-top: 15px;
}

.comment-section {
  display: flex;
  flex-direction: row;
  margin: 20px 0px;
  gap: 10px;
}

.response-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-color);
}

.response-box > i {
  font-size: 20px;
  color: var(--accent-color);
}

.response-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.file-response {
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-color);
  font-weight: 500;
}

.file-link:hover {
  text-decoration: underline;
}

.upload-date {
  font-size: 12px;
  color: var(--text-muted);
}

.no-response {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  color: var(--text-muted);
  font-style: italic;
}

.no-response i {
  font-size: 18px;
}

.attempt-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.attempt-status.completed {
  background: var(--success-bg);
  color: var(--success-text);
}

.customer-infos {
  display: flex;
  flex-direction: row;
  gap: 8px;
  font-size: 12pt;
  margin-top: 10px;
}

.customer-infos .name {
  font-weight: bold;
}

.as-user-banner {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  padding: 10px 20px;
  text-align: center;
  font-weight: bold;
  border-radius: 10px;
}

.fixed-bottom-bar {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  background-color: var(--bg-secondary);
  box-shadow: 0 0px 6px 4px var(--shadow-color);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px;
  gap: 100px;
  border-radius: 50px;
}

.quizz-next-btn, .quizz-prec-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /*background-color: #28a745;*/
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  position: relative;
  transition: background-color 0.2s ease, min-width 0.2s ease;
  cursor: pointer;
  font-size: 14pt;
  box-sizing: border-box;
  text-transform: uppercase;
  flex-shrink: 1;
  border-radius: 50px;
}

.quizz-next-btn {
  background-color: #28a745;
}

.quizz-next-btn:hover {
  background-color: #1e7e34;
  color: white;
}

.quizz-prec-btn {
  background: none;
  color: var(--text-primary);
  border: 2px solid var(--border-color-dark);
}

.quizz-prec-btn:hover {
  background-color: var(--bg-hover);
  border: 2px solid var(--border-color-dark);

}

.quizz-next-btn i, .quizz-prec-btn i {
  font-size: 18pt;
}

.question-progress {
  width: 300px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0px 10px;

}

/* ==========================================
   VERSION SELECTOR
   ========================================== */

.version-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-selector select {
  display: block;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
}

.version-selector select:hover {
  color: var(--accent-color);
}

.version-selector select:focus {
  outline: none;
}

/* Action buttons container */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Publish button */
.btn-publish {
  background-color: var(--success-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-publish:hover {
  background-color: var(--success-color-dark, #0a8043);
  transform: translateY(-1px);
}

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

/* Readonly questions list */
.questions-list.readonly {
  opacity: 1;
}

.question-card.readonly {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-card);
  margin-bottom: 12px;
}

.question-card.readonly .question-header {
  background-color: var(--bg-secondary);
  padding: 12px 15px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.question-card.readonly .question-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.question-card.readonly .question-number {
  font-weight: 600;
  color: var(--accent-color);
}

.question-card.readonly .question-optional {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================
   RESPONSIVE STYLES - MOBILE
   ========================================== */

/* Tablets and small screens (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  .content {
    padding: 0 5%;
    margin: 15px;
  }

  .banner {
    padding: 10px 20px;
  }

  .banner .left-section {
    gap: 15px;
  }

  .fixed-bottom-bar {
    gap: 30px;
  }

  .question-progress {
    width: 200px;
  }
}

/* Mobile devices (max-width: 768px) */
@media screen and (max-width: 768px) {
  /* Global Layout */
  .content {
    padding: 0;
    margin: 10px;
  }

  main {
    margin: 10px 0;
  }

  /* Banner / Navigation */
  .banner {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }

  .banner .left-section {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .banner .right-section {
    width: 100%;
    justify-content: space-between;
  }

  .banner nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .banner nav a {
    padding: 8px 10px;
    font-size: 10px;
  }

  .banner h1 {
    font-size: 20px;
    text-align: center;
  }

  /* Header */
  header > .title-band {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  header > .title-band > .right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  header > .title-band > .left {
    width: 100%;
    flex-wrap: wrap;
  }

  header h1 {
    font-size: 22px;
  }

  /* Tables */
  .quizz-table,
  .participants-table,
  .attempts-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 13px;
  }

  .quizz-table th,
  .quizz-table td,
  .participants-table th,
  .participants-table td,
  .attempts-table th,
  .attempts-table td {
    padding: 8px 10px;
  }

  /* Quiz Cards */
  .quizz-card {
    flex-direction: column;
  }

  .quizz-card-content {
    width: 100%;
    box-sizing: border-box;
  }

  .quizz-start-btn, 
  .quizz-replay-btn, 
  .quizz-view-btn {
    width: 100%;
    clip-path: none;
    margin-left: 0;
    flex-direction: row;
    padding: 15px 20px;
    justify-content: center;
  }

  .quizz-start-btn i, 
  .quizz-replay-btn i, 
  .quizz-view-btn i {
    font-size: 24px;
  }

  .quizz-start-btn:hover,
  .quizz-replay-btn:hover,
  .quizz-view-btn:hover {
    min-width: unset;
  }

  /* Stats Cards */
  .quizz-stats {
    flex-direction: column;
    gap: 10px;
  }

  .stat-card {
    padding: 15px 20px;
  }

  /* Questions */
  .question-content-attempt {
    padding: 15px;
  }

  .question-content-attempt .question-title {
    font-size: 20px;
  }

  .answer-form {
    padding: 0 15px 15px;
  }

  /* Fixed Bottom Bar */
  .fixed-bottom-bar {
    width: calc(100% - 20px);
    gap: 10px;
    padding: 8px;
    bottom: 10px;
    border-radius: 15px;
  }

  .question-progress {
    width: auto;
    flex: 1;
    min-width: 100px;
    font-size: 12px;
    text-align: center;
  }

  .question-progress span {
    display: none;
  }

  .question-progress .progress-bar {
    height: 8px;
  }

  .quizz-next-btn, 
  .quizz-prec-btn {
    padding: 10px 15px;
    font-size: 12px;
    border-radius: 30px;
  }

  .quizz-next-btn span,
  .quizz-prec-btn span {
    display: none;
  }

  .quizz-next-btn i, 
  .quizz-prec-btn i {
    font-size: 18px;
  }

  /* Buttons */
  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .btn.large {
    width: 100%;
  }

  /* Subtitle bar */
  .subtitle-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Bipart band */
  .bipart-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  /* Row container */
  .row-container {
    flex-wrap: wrap;
  }

  /* Upload area */
  .upload-area > label {
    padding: 15px;
  }

  .upload-area > label > p {
    max-width: 90%;
    font-size: 13px;
  }

  /* File cards */
  .uploaded-files {
    flex-wrap: wrap;
    justify-content: center;
  }

  .file-card .miniature {
    height: 60px;
  }

  /* Dropdown */
  .dropdown-menu {
    min-width: 150px;
  }

  /* Question cards */
  .question-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .question-header-left {
    width: 100%;
  }

  /* Form sections */
  .form-section {
    padding: 15px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  /* Yes/No buttons */
  .yes-no-buttons {
    flex-direction: column;
  }

  /* File types grid */
  .file-types-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }

  .file-type-card {
    padding: 10px 5px;
  }

  .file-type-card i {
    font-size: 22px;
  }

  .file-type-card span {
    font-size: 10px;
  }

  /* Attempt info */
  .attempt-info {
    flex-direction: column;
    gap: 8px;
  }

  /* Answer sections */
  .answer-content {
    padding: 10px 15px;
  }

  .response-box {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-section {
    flex-direction: column;
  }

  /* Flash messages */
  .flash {
    padding: 10px 20px;
    font-size: 11pt;
    max-width: calc(100% - 40px);
  }

  /* Profile form */
  .profile-form {
    max-width: 100%;
  }

  /* Customer infos */
  .customer-infos {
    flex-direction: column;
    gap: 5px;
  }

  /* Version selector */
  .version-selector {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  /* Action buttons */
  .action-buttons {
    flex-wrap: wrap;
  }
}

/* Small mobile devices (max-width: 480px) */
@media screen and (max-width: 480px) {
  .content {
    margin: 5px;
  }

  .banner {
    padding: 10px;
  }

  .banner h1 {
    font-size: 18px;
  }

  .banner nav a {
    padding: 6px 8px;
    font-size: 9px;
  }

  header h1 {
    font-size: 18px;
  }

  .question-content-attempt .question-title {
    font-size: 18px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .quizz-title {
    font-size: 16px;
  }

  .quizz-description {
    font-size: 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 12px;
  }

  .fixed-bottom-bar {
    bottom: 5px;
    width: calc(100% - 10px);
    padding: 5px;
  }

  .quizz-next-btn, 
  .quizz-prec-btn {
    padding: 8px 12px;
  }

  /* Tables become card-like on very small screens */
  .quizz-table,
  .participants-table,
  .attempts-table {
    font-size: 11px;
  }

  .quizz-table th,
  .quizz-table td,
  .participants-table th,
  .participants-table td,
  .attempts-table th,
  .attempts-table td {
    padding: 6px 8px;
  }
}