@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --arti-dark: #3e4b55;
  --arti-dark-deep: #2c363e;
  --arti-teal: #16aebd;
  --arti-red: #e2222c;
  --arti-red-dark: #b81822;
  --border: #e3e8ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #2c363e;
}

body.landing-page {
  background:
    radial-gradient(560px circle at 12% 65%, rgba(22, 174, 189, 0.16), transparent 60%),
    radial-gradient(560px circle at 88% 30%, rgba(255, 203, 82, 0.24), transparent 60%),
    radial-gradient(520px circle at 55% 98%, rgba(226, 34, 44, 0.14), transparent 60%),
    #fdf8ef;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--arti-dark);
  padding: 9px 18px;
}

.topbar-title {
  flex: 1;
  text-align: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
}

.back-bar {
  padding: 10px 18px 0;
}

.back-bar-btn {
  display: inline-block;
  border: none;
  color: var(--arti-dark);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(44, 54, 62, 0.12);
  text-decoration: none;
  cursor: pointer;
}

.back-bar-btn:hover {
  background: #eef2f3;
}

.topbar-logout {
  flex-shrink: 0;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 7px 20px;
  border-radius: 999px;
  background: var(--arti-red);
  box-shadow: 0 4px 14px rgba(226, 34, 44, 0.4);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.topbar-logout:hover {
  background: var(--arti-red-dark);
  transform: translateY(-1px);
}

.page-title {
  text-align: center;
  font-weight: 800;
  font-size: 1.5rem;
  margin: 26px 0 4px;
}

.page-subtitle {
  text-align: center;
  color: #6b7680;
  margin: 0 0 24px;
}

.tabs {
  display: flex;
  gap: 10px;
  padding: 20px 24px 16px;
  flex-wrap: wrap;
}

.tabs-left {
  justify-content: flex-start;
}

.tab-btn {
  border: 2px solid var(--border);
  background: #ffffff;
  color: var(--arti-dark);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.tab-btn.active {
  background: var(--arti-dark);
  border-color: var(--arti-dark);
  color: #ffffff;
}

.tab-panel {
  display: none;
  max-width: 720px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.tab-panel.active {
  display: block;
}

.tab-panel.wide {
  max-width: none;
}

.tab-panel.qr-wide {
  max-width: 900px;
}

.panel-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(44, 54, 62, 0.1);
  padding: 24px;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--arti-dark);
  margin: 16px 0 6px;
}

label:first-child {
  margin-top: 0;
}

input[type='text'],
input[type='password'],
input[type='file'],
select {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--arti-dark);
  margin-bottom: 4px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--arti-teal);
}

.picker-level {
  margin-left: 14px;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.add-content-btn {
  margin: 10px 0;
}

.add-content-form {
  margin: 4px 0 14px;
  padding: 14px;
  background: #f8fafb;
  border: 2px dashed var(--border);
  border-radius: 12px;
}

.picker-empty {
  color: #8b979e;
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.landing-content {
  width: 100%;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--arti-dark) 0%, var(--arti-dark-deep) 100%);
  padding: 36px 20px 80px;
  text-align: center;
}

.landing-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 220%;
  background: var(--arti-teal);
  opacity: 0.18;
  transform: rotate(20deg);
  pointer-events: none;
}

.landing-hero-logo {
  position: relative;
  z-index: 1;
  width: 150px;
  border-radius: 14px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.landing-logout-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.landing-logout-btn {
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 14px 36px;
  border-radius: 999px;
  background: var(--arti-red);
  box-shadow: 0 14px 30px rgba(226, 34, 44, 0.4);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.landing-logout-btn:hover {
  background: var(--arti-red-dark);
  transform: translateY(-2px);
}

.landing-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  max-width: 960px;
  margin: -60px auto 40px;
  padding: 0 20px;
}

.landing-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 26px;
  padding: 48px 24px 38px;
  box-shadow: 0 20px 40px rgba(44, 54, 62, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.landing-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.landing-card:hover {
  transform: translateY(-6px) scale(1.015);
}

.landing-card-teal {
  background: linear-gradient(150deg, #22c6d6 0%, #0f8a97 100%);
}

.landing-card-teal:hover {
  box-shadow: 0 26px 48px rgba(22, 174, 189, 0.42);
}

.landing-card-yellow {
  background: linear-gradient(150deg, #ffcb52 0%, #f2932b 100%);
}

.landing-card-yellow:hover {
  box-shadow: 0 26px 48px rgba(242, 147, 43, 0.4);
}

.landing-card-red {
  background: linear-gradient(150deg, #ef4a52 0%, var(--arti-red-dark) 100%);
}

.landing-card-red:hover {
  box-shadow: 0 26px 48px rgba(226, 34, 44, 0.4);
}

.landing-card-icon-badge {
  position: relative;
  z-index: 1;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.landing-card-icon {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.landing-card-title {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 1.2rem;
}

.landing-card-desc {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 18px;
}

.btn-primary {
  background: var(--arti-red);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--arti-red-dark);
}

.btn-primary:disabled {
  background: #c9d0d4;
  cursor: not-allowed;
}

.form-message {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.form-message.error {
  color: var(--arti-red);
}

.form-message.success {
  color: #148a4e;
}

.qr-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
}

.qr-picker-col {
  width: 100%;
}

.qr-result-col {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: #f8fafb;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.qr-image {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #ffffff;
}

.qr-url {
  margin: 12px 0 0;
  word-break: break-all;
  font-size: 0.82rem;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.qr-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.btn-secondary {
  display: inline-block;
  border: 2px solid var(--border);
  background: #ffffff;
  color: var(--arti-dark);
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:hover {
  border-color: var(--arti-teal);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(44, 54, 62, 0.18);
  padding: 34px 30px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-logo {
  width: 90px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 54, 62, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 26px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 40px rgba(44, 54, 62, 0.25);
}

.modal-text {
  margin: 0 0 16px;
  font-weight: 700;
  color: var(--arti-dark);
  font-size: 0.95rem;
}

.modal-input {
  margin-bottom: 18px;
}

.modal-error {
  margin: 8px 0 16px;
  color: var(--arti-red);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.qr-modal-card {
  max-width: 380px;
}

.upload-modal-card {
  max-width: 420px;
  text-align: left;
}

.upload-modal-card .modal-text {
  text-align: center;
}

.upload-modal-card .modal-actions {
  margin-top: 16px;
}

.video-add-modal-card {
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.video-add-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
}

.video-add-row input {
  margin-bottom: 0;
}

.video-add-row-labels {
  margin-bottom: 8px;
}

.video-add-row-labels label {
  margin: 0;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--arti-dark);
}

.video-add-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 320px;
  padding: 2px 10px 2px 2px;
  margin-bottom: 12px;
}

.qr-modal-body {
  color: #6b7680;
  font-size: 0.85rem;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: #f8fafb;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone:hover,
.drop-zone-active {
  border-color: var(--arti-teal);
  background: #eef8f9;
}

.drop-zone-label {
  margin: 0;
  font-weight: 700;
  color: var(--arti-dark);
  font-size: 0.85rem;
}

.drop-zone-files {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #6b7680;
  word-break: break-word;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.browse-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.explorer-page {
  max-width: 1560px;
  margin: 0 auto 60px;
  padding: 0 32px;
}

.explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.explorer-header-text .page-title {
  text-align: left;
  font-size: 1.9rem;
  margin: 0 0 6px;
}

.explorer-header-text .page-subtitle {
  text-align: left;
  font-size: 1.05rem;
  margin: 0;
}

.disk-usage-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
  outline: none;
}

.disk-usage-ring {
  --pct: 0;
  --ring-color: var(--arti-teal);
  width: 136px;
  height: 136px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--border) 0);
  position: relative;
  flex-shrink: 0;
}

.disk-usage-ring.disk-usage-warning {
  --ring-color: #e2a222;
}

.disk-usage-ring.disk-usage-critical {
  --ring-color: var(--arti-red);
}

.disk-usage-ring::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--border);
}

.disk-usage-ring span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--arti-dark);
}

.disk-usage-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b7680;
}

.disk-usage-hover-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 10px 28px rgba(44, 54, 62, 0.14);
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.disk-usage-widget:hover .disk-usage-hover-panel,
.disk-usage-widget:focus-within .disk-usage-hover-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.disk-usage-hover-panel #disk-usage-used {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--arti-dark);
}

.disk-usage-hover-panel #disk-usage-free {
  font-size: 0.8rem;
  color: #6b7680;
}

.explorer-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.explorer-toolbar input[type='text'] {
  flex: 1;
  min-width: 220px;
  margin-bottom: 0;
}

.explorer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.explorer-actions .btn {
  margin-top: 0;
}

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

.explorer-crumb {
  margin-bottom: 0;
  flex-shrink: 0;
}

.explorer-path-box {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 9px 18px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--arti-dark);
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow-x: auto;
}

#explorer-content {
  border-radius: 16px;
  transition: outline-color 0.15s ease, background 0.15s ease;
  outline: 3px dashed transparent;
  outline-offset: 8px;
}

#explorer-content.explorer-content-drag-active {
  outline-color: var(--arti-teal);
  background: #eef8f9;
}

.sinif-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sinif-filter-btn {
  border: 2px solid var(--border);
  background: #ffffff;
  color: var(--arti-dark);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.sinif-filter-btn.active {
  background: var(--arti-dark);
  border-color: var(--arti-dark);
  color: #ffffff;
}

.browse-toolbar input[type='text'] {
  flex: 1;
  min-width: 220px;
  margin-bottom: 0;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px 16px;
}

.browse-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 46px 12px 16px;
  text-align: center;
}

.browse-card-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.browse-card-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--arti-teal);
}

.browse-card-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 3px;
}

.browse-card-icon-btn {
  border: none;
  background: transparent;
  line-height: 1;
  cursor: pointer;
  color: #9aa5ab;
  padding: 6px;
  border-radius: 8px;
}

.browse-card-icon-btn img {
  width: 21px;
  height: 21px;
  display: block;
  opacity: 0.65;
}

.browse-card-icon-btn:hover img {
  opacity: 1;
}

.browse-card-icon-btn.pencil-btn:hover {
  background: #fff1bf;
}

.browse-card-icon-btn.qr-btn:hover {
  background: #d5f5e0;
}

.browse-card-delete {
  border: none;
  background: transparent;
  line-height: 1;
  cursor: pointer;
  color: #9aa5ab;
  padding: 6px;
  border-radius: 8px;
}

.browse-card-delete svg {
  width: 21px;
  height: 21px;
  display: block;
}

.browse-card-delete:hover {
  color: var(--arti-red);
  background: #fdeceb;
}

.browse-card-media-preview {
  width: 100%;
  display: block;
}

audio.browse-card-media-preview {
  height: 32px;
}

video.browse-card-media-preview {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #000000;
}

.browse-card-page-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #f8fafb;
  display: block;
}

.browse-card img {
  -webkit-user-drag: none;
  user-select: none;
}


.browse-card-kind-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.browse-card-kind-label.leaf {
  color: var(--arti-teal);
}

.browse-card-kind-label.folder {
  color: #8b979e;
}

.browse-card-icon {
  width: 148px;
  height: auto;
  display: block;
  margin: 6px auto 0;
}

.browse-card-icon-small {
  width: 112px;
  height: auto;
  margin: 4px auto 18px;
}

.browse-card-name {
  margin-top: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--arti-dark);
  word-break: break-word;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 6px;
}

.checkbox-row input[type='checkbox'] {
  width: auto;
  margin: 0;
}

.checkbox-row label {
  margin: 0;
}
