/* MagmaLand-style: тёмная тема, лава/огонь */
:root {
  --bg-dark: #1a1a1e;
  --bg-card: #1a1a1e;
  --bg-input: #1a1a1e;
  --border: #2a2522;
  --text: #e8e6e3;
  --text-muted: #9a9590;
  --accent: #e85c2a;
  --accent-glow: rgba(232, 92, 42, 0.35);
  --accent-hover: #f07040;
  --success: #2ecc71;
  --error: #e74c3c;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: #0a0a0c;
  color: var(--text);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(232, 92, 42, 0.06), transparent);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

h1, h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
    background: linear-gradient(to left,
            #ff8a00 30%,
            #ffe3c1 60%,
            #ff8a00 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    background-size: 500% auto;
    animation: textShine 4s ease infinite;
}

@keyframes textShine {
    0% {
        background-position: 110%;
    }

    100% {
        background-position: -10%;
    }
}


h2 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 20px;
}
header svg{
  vertical-align: text-top;  
}
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Карточки в стиле MagmaLand */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 70%;
  margin-right: 2.5%;
  display: inline-block;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}


.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c94a1e);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.2s ease;         
}

.btn-secondary:hover {
  border-color: #ff8a00;
  color: #ff8a00;
  text-decoration: none;    
  box-shadow: 0px 0px 10px 0px rgba(255, 138, 0, 1);        
  transition: all 0.2s ease;     
}

/* Поля ввода */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg-input);
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: dark;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #ff8a00;
  transition: all 0.2s ease;    
  box-shadow: 0px 0px 10px 0px rgba(255, 138, 0, 1);    
}
.name{
    margin-top: -10px;
}
label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.text-muted {
  color: var(--text-muted);
}

/* Файлы */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: var(--bg-input);
  margin-bottom: 12px;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload label {
  cursor: pointer;
  color: var(--accent);
  margin: 0;
}

.file-list {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.msg {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.msg.error {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid var(--error);
  color: #ff8a80;
}

.msg.success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid var(--success);
  color: #69f0ae;
}
.magmaland-logo {
    display: block;
    height: 40px;
    width: 200px;
    background: url("../images/logo.webp") center no-repeat;
    background-size: 100% auto;
    margin-right: auto;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    padding: 32px;
}
/* Навбар в стиле MagmaLand */
.site-header {
  box-shadow: 0px 0px 20px 0px rgba(255, 138, 0, 1);
  margin-bottom: 30px;
  margin-top: 1.5%;
  margin-left: 10%;
  margin-right: 10%;
  border-radius: 20px;
  background: rgba(30, 30, 30, 1);    
  border: 1px solid #ff8a00;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin-top: 1.5%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-brand:hover {
  opacity: 0.9;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  border: 1px solid rgba(30, 30, 30, 1);
  transition: all 0.5s ease;
}

.nav a:hover {
  color: #eea88e;
  border-bottom: 1px solid #eea88e;
  text-decoration: none;
  transition: all 0.5s ease;    
}

.nav a.active {
  color: var(--accent);
  transition: all 0.5s ease;    
  border-bottom: 2px solid rgba(232, 92, 42, 0.12);
  text-decoration: none;
}

/* Список анкет */
.anketa-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.5s ease; 
  scale: 100%;
}

.anketa-list-item:hover {
  border-color: #ff8a00;
  box-shadow: 0px 0px 10px 0px rgba(255, 138, 0, 1);        
  scale: 101%;
  transition: all 0.5s ease;     
  text-decoration: none;
  color: var(--text);
}
.anketa-list-item:hover span {
  color: #ff8a00;
  transition: all 0.5s ease;     
}
.anketa-list-item:hover img{
  border: 2px solid #ff8a00;
  box-shadow: 0px 0px 10px 0px rgba(255, 138, 0, 1);     
  transition: all 0.5s ease;     
}
img{
  border: 3px solid rgba(255,255,255,0);
  transition: all 0.5s ease;     
}
.anketa-list-item .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.anketa-list-item .title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 20px;
  color: #888
}
.date-created{
    color: #333;
    font-size: 15px;
}

.search-wrap {
  margin-bottom: 20px;
}

.search-wrap input {
  margin-bottom: 0;
}

/* Просмотр анкеты */
.anketa-detail .field {
  margin-bottom: 16px;
}
.fields2{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 27.5%;
  float: right;
}

.fields2 .field-label{
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;    
}

.anketa-detail .field-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.anketa-detail .field-value {
  font-size: 1rem;
}

.anketa-detail .files a {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 8px;
}

.anketa-detail .files img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin-top: 8px;
}

.anketa-detail video {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.punishment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.punishment-row input[type="number"] { 
    margin-bottom: 0;
}

.inline-label {
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    margin: 0;
    cursor: pointer; 
}

.required { 
    color: var(--accent); 
}

.anketa-list-item .list-desc { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-top: 6px; 
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; 
    overflow: hidden;
}
.var{
    display: inline;
    color: #ff8a00;
}

.desc-punish{
    color: #ff8a00;
    font-size: 15px;
}
.anketa-list-item .list-thumb { 
    width: 36%; 
    object-fit: scale-down; 
    border-radius: 15px; 
    margin-top: 8px; 
    flex-shrink: 0; 
}
.anketa-list-item .list-body { 
    flex: 1; 
    min-width: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.btn-loading .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
}

code {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}
.btn-up {
    position: fixed;
    transition: all 0.4s ease;
    background: rgba(38, 38, 38, .6);
    border-radius: 5px 5px;
    border: 2px solid rgba(64, 64, 64, .7);
    right: 3%;
    bottom: 0px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    z-index: 100000;
    bottom: -10px;
}

.btn-up::before {
    content: "";
    width: 40px;
    height: 40px;
    transition: background 0.4s ease;
    background: transparent no-repeat center center;
    background-size: 100% 100%;
    background-image: url("../images/up.webp");
}

.btn-up_hide {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .btn-up:hover {
        transition: all 0.4s ease;
        background: rgb(126, 68, 0);
        scale: 98%;
        border: 2px solid #ff8a00;
        box-shadow: 0px 5px 30px -4px rgba(255, 138, 0, 0.8);
        transition: all 0.5s cubic-bezier(.175, .885, .32, 1.275);
    }
}

.search-wrap-dates {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.date-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.date-filter-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.date-filters input[type="date"] {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
}

.status-filter-select {
  min-width: 200px;
  max-width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  margin-bottom: 0;
}

.status-filter-row {
  width: 100%;
}

.status-hint {
  margin-top: 6px;
  font-size: 0.9rem;
}

.status-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.status-select {
  min-width: 220px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
}

.status-history-card .status-history-title {
  font-size: 1.1rem;
  margin: 0 0 14px 0;
  color: var(--text);
}

.status-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-history-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.status-history-item:last-child {
  border-bottom: none;
}

.status-history-when {
  color: var(--text-muted);
}

.status-history-who {
  color: var(--accent);
}