:root {
	--blue: #0061ff;
	--blue-dark: #0050d4;
	--ink: #1e1919;
	--muted: #6f6a66;
	--line: #d9d5d0;
	--surface: #f7f5f2;
	--white: #ffffff;
	--green: #0b875b;
	--red: #c3372b;
	--yellow: #b7791f;
}

* {
	box-sizing: border-box;
}

html {
	color-scheme: light;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: 0;
}

body {
	min-height: 100vh;
	margin: 0;
	background: var(--surface);
	color: var(--ink);
}

a {
	color: inherit;
	text-decoration: none;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	padding: 0 24px;
	border-bottom: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(10px);
}

.brand,
.nav-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.brand {
	font-weight: 700;
}

.brand-mark {
	display: grid;
	width: 30px;
	height: 30px;
	place-items: center;
	background: var(--blue);
	color: var(--white);
	font-weight: 800;
}

.ghost-link {
	color: var(--blue);
	font-weight: 600;
}

.soft-pill {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0 12px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--muted);
	font-size: 13px;
}

.shell {
	padding: 28px;
}

.workspace {
	display: grid;
	grid-template-columns: 210px minmax(0, 1fr);
	gap: 28px;
	max-width: 1180px;
	margin: 0 auto;
}

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.side-item {
	display: flex;
	align-items: center;
	min-height: 38px;
	padding: 0 12px;
	color: var(--muted);
	font-size: 15px;
	font-weight: 600;
}

.side-item.active,
.side-item:hover {
	background: #e8e5e1;
	color: var(--ink);
}

.main-column {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 22px;
}

.upload-panel,
.table-section,
.share-card,
.login-card {
	border: 1px solid var(--line);
	background: var(--white);
}

.upload-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
	gap: 28px;
	padding: 28px;
}

.eyebrow {
	margin: 0 0 8px;
	color: var(--blue);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 10px;
	font-size: 30px;
	line-height: 1.15;
}

h2 {
	margin-bottom: 0;
	font-size: 18px;
}

.muted {
	margin-bottom: 0;
	color: var(--muted);
	line-height: 1.5;
}

.upload-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.drop-zone {
	display: grid;
	min-height: 146px;
	place-items: center;
	padding: 18px;
	border: 1px dashed #aaa49f;
	background: #fbfaf8;
	text-align: center;
	cursor: pointer;
}

.drop-zone:hover {
	border-color: var(--blue);
	background: #f4f8ff;
}

.drop-zone input {
	width: 100%;
	max-width: 240px;
}

.drop-title,
.drop-copy {
	display: block;
}

.drop-title {
	margin-top: 10px;
	font-weight: 700;
}

.drop-copy {
	color: var(--muted);
	font-size: 13px;
}

.primary-button,
.copy-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	border: 0;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.primary-button {
	padding: 0 18px;
	background: var(--blue);
	color: var(--white);
}

.primary-button:hover {
	background: var(--blue-dark);
}

.copy-button {
	min-width: 76px;
	padding: 0 14px;
	border: 1px solid var(--line);
	background: var(--white);
	color: var(--ink);
}

.copy-button:hover {
	border-color: var(--blue);
	color: var(--blue);
}

.error {
	grid-column: 1 / -1;
	margin: 0;
	color: var(--red);
	font-weight: 700;
}

.share-result {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px;
	border: 1px solid #b7cdfd;
	background: #f4f8ff;
}

.label {
	display: block;
	margin-bottom: 4px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.table-section {
	overflow: hidden;
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--line);
}

.section-heading span {
	color: var(--muted);
	font-size: 13px;
}

.file-list,
.activity-list {
	display: flex;
	flex-direction: column;
}

.file-row,
.activity-row {
	display: grid;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--line);
}

.file-row {
	grid-template-columns: 38px minmax(0, 1fr) minmax(170px, auto) auto;
}

.file-row:last-child,
.activity-row:last-child {
	border-bottom: 0;
}

.file-icon {
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	background: #edf3ff;
	color: var(--blue);
	font-size: 20px;
	font-weight: 800;
}

.file-meta {
	min-width: 0;
}

.file-name {
	display: block;
	overflow: hidden;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file-meta span,
.lock-state {
	color: var(--muted);
	font-size: 13px;
}

.lock-state {
	display: flex;
	align-items: center;
	gap: 8px;
}

.status-dot {
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: var(--yellow);
}

.status-dot.locked {
	background: var(--green);
}

.activity-row {
	grid-template-columns: 110px 150px 160px 190px minmax(0, 1fr);
	color: var(--muted);
	font-size: 13px;
}

.event-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 0 10px;
	border: 1px solid var(--line);
	color: var(--ink);
	font-weight: 700;
}

.event-badge.allowed {
	border-color: #b7e2cf;
	color: var(--green);
}

.event-badge.denied {
	border-color: #f0bab4;
	color: var(--red);
}

.denial {
	color: var(--red);
}

.empty-state {
	padding: 26px 20px;
	color: var(--muted);
}

.share-body {
	background: #fbfaf8;
}

.share-shell,
.login-shell {
	display: grid;
	min-height: calc(100vh - 64px);
	place-items: center;
	padding: 28px;
}

.share-card {
	width: min(720px, 100%);
	padding: 28px;
}

.file-preview {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 24px;
}

.large-file-icon {
	display: grid;
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	place-items: center;
	background: #edf3ff;
	color: var(--blue);
	font-size: 34px;
	font-weight: 900;
}

.denied-icon {
	background: #fff0ee;
	color: var(--red);
}

.audio-player {
	width: 100%;
	margin-bottom: 22px;
}

.share-footer,
.notice-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
}

.share-footer.action-only {
	justify-content: flex-end;
}

.share-footer p,
.notice-row p {
	margin: 0;
	color: var(--muted);
}

.login-card {
	display: flex;
	width: min(420px, 100%);
	flex-direction: column;
	gap: 16px;
	padding: 28px;
}

.login-card label {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
}

.login-card input {
	min-height: 42px;
	border: 1px solid var(--line);
	padding: 0 12px;
	font: inherit;
}

.login-card input:focus {
	border-color: var(--blue);
	outline: 2px solid #d6e4ff;
}

@media (max-width: 820px) {
	.shell {
		padding: 16px;
	}

	.workspace {
		grid-template-columns: 1fr;
	}

	.sidebar {
		flex-direction: row;
	}

	.upload-panel {
		grid-template-columns: 1fr;
		padding: 20px;
	}

	.file-row {
		grid-template-columns: 38px minmax(0, 1fr);
	}

	.lock-state,
	.file-row .copy-button {
		grid-column: 2;
		justify-self: start;
	}

	.activity-row {
		grid-template-columns: 1fr;
	}

	.share-result,
	.share-footer,
	.notice-row {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (max-width: 520px) {
	.topbar {
		padding: 0 14px;
	}

	h1 {
		font-size: 24px;
	}

	.file-preview {
		align-items: flex-start;
		flex-direction: column;
	}
}
