@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --accent: #ff7b00;
  --accent-dim: rgba(255, 123, 0, 0.12);
  --signal-red: #ff4d6d;
  --signal-amber: #ffb703;
  --signal-green: #52b788;
  --bg: #0d0b09;
  --bg-panel: #15110d;
  --bg-surface: #211a14;
  --bg-hover: #2b2219;
  --border: rgba(255, 123, 0, 0.15);
  --border-hard: rgba(255, 123, 0, 0.3);
  --border-panel: rgba(255, 255, 255, 0.05);
  --text: #fff7f0;
  --muted: #d4a373;
  --faint: #6b4e2e;
  --font-display: -apple-system, "Manrope", sans-serif;
  --font-mono: -apple-system, "Roboto", sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
}

a {
  text-decoration: none;
  color: var(--accent);
  font-family: inherit;
  transition: color 0.2s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-display);
}

body {
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  background-image:
    linear-gradient(rgba(0, 212, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 232, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

button,
input,
textarea {
  font-family: inherit;
}

.sidebar {
  width: 250px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar .logo {
  text-align: center;
  margin-bottom: 30px;
}

.sidebar .logo img {
  width: 60px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.sidebar .logo h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 10px;
  color: var(--text);
}

.sidebar nav {
  flex-grow: 1;
}

.sidebar nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border);
}

.sidebar .logout {
  background: transparent;
  color: var(--signal-red);
  border: 1px solid var(--signal-red);
  padding: 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background 0.2s,
    color 0.2s;
}

.sidebar .logout:hover {
  background: var(--signal-red);
  color: var(--bg);
}

.main-content {
  margin-left: 260px;
  margin-right: 5%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  flex: 1 1 0%;
  padding: 0px;
}

.main-content h1 {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.content-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  max-width: 700px;
  margin: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.form-group {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

form {
  background: var(--bg-panel);
  padding: 25px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--muted);
}

form input[type="text"],
form input[type="email"],
form input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition:
    border-color 0.18s,
    background 0.18s,
    box-shadow 0.18s;
  box-sizing: border-box;
  outline: none;
}

form input:focus {
  border-color: var(--border-hard);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

form input[disabled] {
  background: var(--bg-panel);
  color: var(--faint);
  cursor: not-allowed;
  border-color: var(--border-panel);
}

form button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background 0.2s,
    color 0.2s;
  width: 100%;
}

form button:hover {
  background: var(--accent);
  color: var(--bg);
}

.statusBox {
  margin-top: 15px;
  font-size: 0.95rem;
  font-weight: bold;
  text-align: center;
}

.statusBox.success {
  color: #44bd32;
}

.statusBox.error {
  color: #e84118;
}

form textarea {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
  outline: none;
  transition:
    border-color 0.18s,
    background 0.18s,
    box-shadow 0.18s;
}

form input[type="file"] {
  border: none;
  margin-bottom: 15px;
  font-size: 0.82rem;
  color: var(--muted);
  background: transparent;
}

form input:focus,
form textarea:focus {
  border-color: var(--border-hard);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px var(--accent-dim);
  outline: none;
}

#uploadStatus {
  margin-top: 15px;
  font-size: 0.95rem;
  font-weight: bold;
  text-align: center;
}

#uploadStatus.success {
  color: #44bd32;
}

#uploadStatus.error {
  color: #e84118;
}

#btn-upl {
  display: inline-block;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  margin-top: 10px;
}

#btn-upl:hover {
  background: linear-gradient(135deg, #0056b3, #004099);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

#btn-upl:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

#btn-upl:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

#saveBtn {
  display: inline-block;
  background: linear-gradient(135deg, #0056b3, #004099);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#inp-upl {
  display: none;
}

#inp-upl + label {
  display: inline-block;
  padding: 12px 20px;
  background: linear-gradient(135deg, #0077ff, #00c6ff);
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 119, 255, 0.3);
  margin-top: 10px;
}

#inp-upl + label:hover {
  background: linear-gradient(135deg, #005fcc, #0099cc);
  box-shadow: 0 6px 12px rgba(0, 119, 255, 0.4);
  transform: translateY(-2px);
}

#inp-upl + label:active {
  transform: translateY(1px);
  box-shadow: 0 3px 6px rgba(0, 119, 255, 0.2);
}

#file-name {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.statusBox {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.5;
  border-left: 4px solid;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
  margin-bottom: 15px;
}

.statusBox.error {
  background-color: #fee;
  border-left-color: #dc2626;
  color: #7f1d1d;
}

.statusBox.error::before {
  content: "";
  font-weight: bold;
  font-size: 18px;
  color: #dc2626;
  flex-shrink: 0;
}

.statusBox.success {
  background-color: #efe;
  border-left-color: #16a34a;
  color: #1b4332;
}

.statusBox.success::before {
  content: "";
  font-weight: bold;
  font-size: 18px;
  color: #16a34a;
  flex-shrink: 0;
}

.statusBox.info {
  background-color: #efe;
  border-left-color: #0891b2;
  color: #0c4a6e;
}

.statusBox.info::before {
  content: "";
  font-weight: bold;
  font-size: 18px;
  color: #0891b2;
  flex-shrink: 0;
}

#closeSMsg {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  margin: 0;
  width: 30px;
  height: 30px;
}

#closeSMsg:hover {
  color: var(--faint);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 15px 15px 10px;
    display: flex;
    flex-direction: column;
  }

  .sidebar nav {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .sidebar nav a {
    padding: 12px;
  }

  .sidebar .logout {
    width: 100%;
    margin-top: 10px;
  }

  .main-content {
    margin-left: 0;
    margin-top: 30px;
    min-height: auto;
    padding: 20px;
  }

  .main-content h1 {
    font-size: 1.4rem;
  }

  form {
    width: 100%;
    max-width: 100%;
    padding: 18px;
    box-sizing: border-box;
  }

  #btn-upl,
  #saveBtn {
    width: 100%;
    font-size: 14px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }

  form {
    padding: 15px;
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  form label {
    font-size: 0.85rem;
  }

  form input,
  form textarea {
    font-size: 0.9rem;
    padding: 8px;
  }

  #btn-upl,
  #saveBtn {
    font-size: 13px;
    padding: 8px 12px;
  }

  #file-name {
    font-size: 12px;
  }
}
