:root {
  --accent: #4a9eff;
  --accent-dark: #1a6abf;
  --off-white: #f0f4ff;
  --muted: #7a9abf;
  --dark: #060f1e;
  --card-bg: #0d1f38;
  --border: rgba(74, 158, 255, 0.16);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--off-white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

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

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

.dr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}

.dr-brand { display: flex; align-items: center; gap: 10px; }

.dr-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent);
  color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px;
}

.dr-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: 0.02em; }

.dr-badge {
  font-size: 11px; color: var(--muted);
  background: rgba(74,158,255,0.08);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  margin-left: 10px;
}

.dr-user { display: flex; align-items: center; gap: 14px; }

.dr-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(74,158,255,0.16);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
}

.dr-main { max-width: 960px; margin: 0 auto; padding: 40px 32px 80px; }

.dr-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500; font-size: 20px;
  margin: 0 0 16px;
  color: var(--off-white);
}

.dr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.dr-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: border-color .15s ease;
}

.dr-card:hover { border-color: var(--accent-dark); }

.dr-card-top { display: flex; align-items: flex-start; justify-content: space-between; }

.dr-card-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(74,158,255,0.12);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}

.dr-card-title { font-size: 15px; font-weight: 500; margin: 12px 0 2px; color: var(--off-white); }
.dr-card-sub { font-size: 12px; color: var(--muted); }

.dr-list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--card-bg);
}

.dr-list-row-title { font-size: 14px; font-weight: 500; }
.dr-list-row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.dr-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--border-strong, rgba(74,158,255,0.35));
  color: var(--off-white);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
}
.dr-btn:hover { background: rgba(74,158,255,0.08); }
.dr-btn.primary { background: var(--accent); color: var(--dark); border-color: var(--accent); font-weight: 500; }
.dr-btn.primary:hover { background: var(--accent-dark); }

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

.dr-login-card {
  width: 100%; max-width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
}

.dr-login-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.dr-login-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.dr-foot-note {
  font-size: 11px; color: var(--muted); text-align: center; margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.dr-empty { font-size: 13px; color: var(--muted); padding: 20px 0; }

.dr-editor-toolbar {
  display: flex; gap: 4px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 10px;
  background: rgba(74,158,255,0.04);
}

.dr-msg { font-size: 13px; line-height: 1.5; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.dr-msg.ok { background: rgba(74,158,255,0.12); color: #bfe0ff; border: 1px solid rgba(74,158,255,0.35); }
.dr-msg.err { background: rgba(255,90,90,0.10); color: #ffb4b4; border: 1px solid rgba(255,90,90,0.35); }

.dr-editor-toolbar button {
  background: transparent; border: none; color: var(--muted);
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 15px;
}
.dr-editor-toolbar button:hover { color: var(--off-white); background: rgba(74,158,255,0.1); }

.dr-editor-body {
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  padding: 16px;
  min-height: 220px;
  font-size: 14px;
  line-height: 1.7;
}
.dr-editor-body:focus { outline: none; }
.dr-editor-body:empty::before { content: attr(data-placeholder); color: var(--muted); }

.dr-field { width: 100%; margin-bottom: 14px; }
.dr-field input, .dr-field select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--off-white);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.dr-label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }

.dr-doc-body {
  background: #fff;
  color: #1a1a1a;
  border-radius: 10px;
  padding: 40px clamp(20px, 6vw, 64px);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
}
.dr-doc-body img { max-width: 100%; height: auto; }

.dr-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dr-sheet-table th, .dr-sheet-table td {
  border: 1px solid #ddd;
  padding: 6px 10px;
  text-align: left;
}
.dr-sheet-table th { background: #f2f2f2; font-weight: 500; }
