/* FONT */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500&display=swap');

/*--accent: #0a84ff; */

:root {
	--bg: #f7f9fc;
	--text: #1b1d24;
	--muted: #6b7280;
	--border: #d4d7dd;
	--border_acc_btn: white;
	--accent: #1982c4;
	--accent_1: #ffca3a;
	--accent_2: #ff595e;
	--accent_3: #008000;
	--radius: 6px;
	--pad: 10px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Roboto Mono", monospace;
}

/* HEADER */
.topbar {
	background: #fff;
	border-bottom: 1px solid var(--border);
	padding: 10px 0;
}

.nav {
	max-width: 2000px;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
}

.brand {
	display: flex;
	gap: 8px;
	color: var(--text);
	text-decoration: none;
}

.brand-sub {
	font-size: .8rem;
	color: var(--muted);
}

/* LAYOUT */
.layout {
	max-width: 2000px;
	margin: 20px auto;
	padding: 0 16px;
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 20px;
}

.column {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
}

/* Detail panel spans two columns */
.span2 {
	grid-column: span 2;
}

/* INPUTS */
.input,
textarea {
	width: 95%;
	padding: var(--pad);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-family: inherit;
	margin-bottom: 8px;
}

.input:focus,
textarea:focus {
	outline: 2px solid var(--accent);
	border-color: var(--accent);
}

.label {
	color: var(--muted);
	font-size: .85rem;
	margin-top: 10px;
}

/* BUTTONS */
.btn {
	padding: 8px 14px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: #fff;
	cursor: pointer;
}

.btn:hover {
	background: #eef2f6;
}

.btn.primary {
	background: var(--accent);
	color: white;
	border-color: var(--accent);
}

.btn.primary:hover {
	background: #006fe0;
}

.btn.red {
	background: var(--accent_2);
	color: white;
	border-color: var(--accent_2);
}

.btn.red:hover {
	background: darkred;
}

.btn.green {
	background: var(--accent_3);
	color: white;
	border-color: var(--accent_3);
}

.btn.green:hover {
	background: darkgreen;
}

/* TABLE */
.table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.table th {
	text-align: left;
	color: var(--muted);
	font-size: .85rem;
	border-bottom: 1px solid var(--border);
	padding-bottom: 4px;
}

.table td {
	padding: 8px 0;
	border-bottom: 1px solid var(--border);
}

.table tr:hover {
	background: #f1f5fa;
	cursor: pointer;
}

.table tr.selected {
	background: #e8f2ff;
}

/* STATUSES */
.status {
	margin-top: 6px;
	color: var(--muted);
	font-size: .85rem;
}

.status.error {
	color: #b91c1c;
}

.status.success {
	color: #059669;
}

/* LISTS */
.list {
	padding: 0;
	margin: 10px 0;
	list-style: none;
}

.list li {
	padding: 8px;
	border-bottom: 1px solid var(--border);
	cursor: pointer;
}

.list li:hover {
	background: #f1f5fa;
}

.list li.selected {
	background: #e8f2ff;
}

.list.small li {
	font-size: .85rem;
	padding: 6px;
}

/* EMPTY STATES */
.empty {
	color: var(--muted);
	padding: 8px 0;
}

/* DROPZONE */
.dropzone {
	border: 2px dashed var(--border);
	padding: 20px;
	border-radius: var(--radius);
	text-align: center;
	color: var(--muted);
	margin-bottom: 10px;
}

.dropzone:hover {
	border-color: var(--accent);
}

/* SUB GRID */
.subgrid {
	margin-top: 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.subcol {
	background: #fff;
	border: 1px solid var(--border);
	padding: 16px;
	border-radius: var(--radius);
}

.meta div {
	font-size: .85rem;
	color: var(--muted);
}

.action-btn.enote {
	padding: 4px 8px;
	border-radius: var(--radius);
	border: 2px solid var(--border_acc_btn);
	background: var(--accent);
	cursor: pointer;
	color: white;
}

.action-btn.enote:hover {
	background: #006fe0;
}

.action-btn.archive {
	padding: 4px 8px;
	border-radius: var(--radius);
	border: 2px solid var(--border_acc_btn);
	background: var(--accent_1);
	cursor: pointer;
	color: white;
}

.action-btn.delete {
	padding: 4px 8px;
	border-radius: var(--radius);
	border: 2px solid var(--border_acc_btn);
	background: var(--accent_2);
	cursor: pointer;
	color: white;
}

.exp-actions {
	display: flex;
	gap: 6px;
	justify-content: flex-end;
}

/* --- Modal overlay --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4rem;
  z-index: 2000;
}

.modal[hidden] {
	display: none !important;
}

/* --- Modal window --- */
.modal-content {
  background: white;
  width: 80%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  padding: 2rem;
  position: relative;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
}

