:root {
	/* Refined palette */
	--teal-900: #0a2e3c;
	--teal-800: #0d3f52;
	--teal-700: #115368;
	--teal-600: #16697a;
	--blue-700: #155b6d;
	--primary-500: #3b82f6;
	--primary-600: #2563eb;
	--primary-700: #1d4ed8;
	--primary-800: #1e40af;
	--surface: #f1f5f9;
	--surface-warm: #f8fafc;
	--card: #ffffff;
	--white: #ffffff;
	--ink: #0f172a;
	--ink-light: #1e293b;
	--muted: #64748b;
	--muted-light: #94a3b8;
	--accent-orange: #f97316;
	--accent-orange-dark: #ea580c;
	--green-500: #22c55e;
	--green-600: #16a34a;
	--success-bg: #ecfdf5;
	--success-text: #065f46;
	--warning-bg: #fffbeb;
	--link-blue: #2563eb;
	--shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
	--shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -2px rgba(0, 0, 0, .05);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .08), 0 4px 6px -4px rgba(0, 0, 0, .05);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .08), 0 8px 10px -6px rgba(0, 0, 0, .04);
	--shadow-glow: 0 0 20px rgba(37, 99, 235, .15);
	--radius: 12px;
	--radius-lg: 16px;
	--radius-sm: 8px;
	--radius-xs: 6px;
	--space: 8px;
	--space-lg: 24px;
	--space-xl: 32px;
	--transition: .2s cubic-bezier(.4, 0, .2, 1);
}

* {
	box-sizing: border-box;
}

html {
	overflow-x: hidden;
	height: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	color: var(--ink);
	background: var(--surface);
	overflow-x: hidden;
	height: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ==============================
   HEADER
   ============================== */
.app-header {
	background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 50%, var(--teal-600) 100%);
	color: var(--white);
	box-shadow: var(--shadow-lg);
	position: relative;
	z-index: 10;
}

.app-header::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--primary-500), var(--green-500), var(--accent-orange));
}

.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1 1 auto;
}

.brand-logo {
	width: 56px;
	height: 56px;
	display: block;
	object-fit: cover;
	border-radius: 50%;
	flex-shrink: 0;
	border: 3px solid rgba(255,255,255,.25);
	box-shadow: 0 2px 8px rgba(0,0,0,.15);
	transition: transform var(--transition), border-color var(--transition);
}

.brand-logo:hover {
	transform: scale(1.05);
	border-color: rgba(255,255,255,.5);
}

.brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.brand-title {
	font-weight: 800;
	font-size: 28px;
	letter-spacing: -.5px;
	line-height: 1.1;
}

.brand-subtitle {
	font-weight: 500;
	font-size: 13px;
	line-height: 1.3;
	opacity: .8;
	letter-spacing: .2px;
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: .3px;
	border-radius: var(--radius-sm);
	transition: all var(--transition);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	position: relative;
	overflow: hidden;
}

.btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, transparent 50%);
	pointer-events: none;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
	color: var(--white);
	padding: 12px 24px;
	box-shadow: var(--shadow-md), 0 0 0 0 rgba(37, 99, 235, .3);
}

.btn-primary:hover {
	box-shadow: var(--shadow-lg), 0 0 20px rgba(37, 99, 235, .25);
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.btn-primary:active {
	transform: translateY(0);
	box-shadow: var(--shadow);
}

.btn-large {
	padding: 14px 32px;
	font-size: 1rem;
	border-radius: var(--radius);
}

.btn-admin {
	background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
	color: var(--white);
	padding: 10px 20px;
	font-size: 0.85rem;
	box-shadow: var(--shadow);
}

.btn-admin:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
	filter: brightness(1.05);
}

.btn-danger {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	color: var(--white);
	padding: 10px 18px;
	font-size: 0.85rem;
}

.btn-danger:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
}

/* ==============================
   LAYOUT
   ============================== */
.content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px 80px;
}

/* Auth pages (login, register, forgot) */
.content--auth {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 72px);
	padding: 24px 20px;
	background:
		radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, .06) 0%, transparent 50%),
		radial-gradient(ellipse at 80% 20%, rgba(22, 105, 122, .06) 0%, transparent 50%),
		var(--surface);
}

.content--auth .login-panel {
	padding: 0;
	width: 100%;
	max-width: 440px;
}

.login-panel {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding-top: 16px;
}

/* ==============================
   FORM FIELDS
   ============================== */
.field {
	width: 520px;
	max-width: 90vw;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

.login-card .field {
	width: 100%;
	max-width: none;
}

.field-label {
	color: var(--ink);
	font-weight: 700;
	font-size: 0.85rem;
	text-align: left;
	padding: 0;
	display: block;
	letter-spacing: .2px;
}

.field-hint {
	font-size: 0.8rem;
	color: var(--muted);
	margin-top: 2px;
	line-height: 1.4;
}

.field-error {
	font-size: 0.8rem;
	color: #dc2626;
	margin-top: 4px;
	font-weight: 600;
	line-height: 1.3;
}

.field-error:not([hidden]) {
	display: block;
}

.text-input {
	height: 48px;
	border: 2px solid #e2e8f0;
	border-radius: var(--radius-sm);
	padding: 0 16px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	outline: none;
	background: var(--card);
	color: var(--ink);
	transition: border-color var(--transition), box-shadow var(--transition);
}

.text-input::placeholder {
	color: var(--muted-light);
	font-weight: 400;
}

.text-input:hover {
	border-color: #cbd5e1;
}

.text-input:focus {
	border-color: var(--primary-600);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.actions {
	margin-top: 8px;
}

.links {
	margin-top: 0;
}

.links a {
	color: var(--link-blue);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: color var(--transition);
}

.links a:hover {
	color: var(--primary-800);
	text-decoration: underline;
}

.page-intro a,
.section-card-desc a {
	color: var(--link-blue);
	font-weight: 600;
	text-decoration: none;
	transition: color var(--transition);
}
.page-intro a:hover,
.section-card-desc a:hover {
	text-decoration: underline;
}

.create {
	margin-top: 12px;
}

/* ==============================
   CARDS
   ============================== */
.page-intro {
	font-size: 0.95rem;
	color: var(--muted);
	max-width: 560px;
	line-height: 1.6;
	margin: 0 0 var(--space-lg);
}

.section-card {
	background: var(--card);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	padding: var(--space-xl);
	margin-bottom: var(--space-lg);
	border: 1px solid rgba(226, 232, 240, .8);
	min-width: 0;
	transition: box-shadow var(--transition);
}

.section-card:hover {
	box-shadow: var(--shadow-md);
}

.section-card:last-child {
	margin-bottom: 0;
}

.section-card-title {
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--ink);
	margin: 0 0 4px;
	letter-spacing: -.2px;
}

.section-card-desc {
	font-size: 0.875rem;
	color: var(--muted);
	margin: 0 0 var(--space-lg);
	line-height: 1.5;
}

.step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
	color: var(--white);
	font-weight: 800;
	font-size: 0.8rem;
	border-radius: 50%;
	margin-right: 10px;
	vertical-align: middle;
	box-shadow: var(--shadow-xs);
}

/* ==============================
   LOGIN CARD
   ============================== */
.login-card {
	background: var(--card);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	padding: 36px 32px;
	width: 100%;
	max-width: 100%;
	border: 1px solid rgba(226, 232, 240, .6);
	position: relative;
	overflow: hidden;
}

.login-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--primary-600), var(--teal-600));
}

.login-card .card-title {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--ink);
	margin: 0 0 6px;
	letter-spacing: -.3px;
}

.login-card .card-desc {
	font-size: 0.875rem;
	color: var(--muted);
	margin: 0 0 24px;
	line-height: 1.5;
}

.login-card .field {
	margin-bottom: 6px;
}

.login-card .field:last-of-type {
	margin-bottom: 0;
}

.login-card .actions {
	margin-top: 24px;
	margin-bottom: 0;
}

.login-card .actions .btn-primary {
	width: 100%;
}

.login-card .links {
	margin-top: 16px;
	margin-bottom: 0;
	text-align: center;
}

.login-card .create {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #f1f5f9;
	text-align: center;
}

.login-card .create .btn-primary {
	width: 100%;
	background: linear-gradient(135deg, var(--teal-700), var(--teal-800));
}

.login-card__back {
	margin-top: 16px;
	margin-bottom: 0;
	text-align: center;
}

/* ==============================
   DASHBOARD SHELL
   ============================== */
.app-shell {
	display: grid;
	grid-template-columns: 260px 1fr;
	min-height: calc(100vh - 72px);
	min-width: 0;
}

.side-nav {
	background: linear-gradient(180deg, var(--teal-900) 0%, var(--teal-800) 100%);
	color: var(--white);
	display: flex;
	flex-direction: column;
	box-shadow: 2px 0 10px rgba(0, 0, 0, .08);
}

.side-nav .brand-block {
	padding: 22px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 1px solid rgba(255,255,255,.1);
}

.side-nav .brand-block .brand-logo {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.2);
}

.side-nav .brand-block .brand-title {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.3px;
}

.side-nav .brand-subtitle {
	font-size: 0.7rem;
	opacity: .7;
	font-weight: 500;
}

.nav-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 20px;
	color: rgba(255,255,255,.75);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	border-bottom: 1px solid rgba(255,255,255,.04);
	transition: all var(--transition);
	position: relative;
}

.nav-link:hover {
	background: rgba(255,255,255,.08);
	color: var(--white);
}

.nav-link.active {
	background: rgba(255,255,255,.12);
	color: var(--white);
	font-weight: 700;
}

.nav-link.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--primary-500);
	border-radius: 0 2px 2px 0;
}

.nav-spacer {
	flex: 1 1 auto;
}

.main-panel {
	padding: 36px 32px;
	background: var(--surface);
	min-width: 0;
}

.main-panel .page-title {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--ink);
	margin: 0 0 4px;
	letter-spacing: -.3px;
}

/* ==============================
   PROFILE SUMMARY
   ============================== */
.profile-summary {
	display: grid;
	grid-template-columns: 90px 1fr;
	gap: var(--space-lg);
	align-items: center;
	padding: 20px;
	background: linear-gradient(135deg, var(--surface-warm), var(--surface));
	border-radius: var(--radius);
	border: 1px solid rgba(226, 232, 240, .8);
}

.profile-summary .profile-details p,
.profile-details p {
	margin: 0 0 6px;
	font-size: 0.9rem;
	line-height: 1.45;
	overflow-wrap: break-word;
	word-break: break-word;
}

.profile-summary .profile-details p:last-child,
.profile-details p:last-child {
	margin-bottom: 0;
}

.placeholder-avatar {
	width: 90px;
	height: 90px;
	background: linear-gradient(135deg, var(--primary-600), var(--teal-600));
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.profile-avatar-wrap {
	width: 90px;
	height: 90px;
	flex-shrink: 0;
}

.profile-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius);
	display: block;
	box-shadow: var(--shadow);
}

.h2 {
	font-size: 1.2rem;
	font-weight: 800;
	margin: 0 0 12px;
	color: var(--ink);
	letter-spacing: -.2px;
}

/* ==============================
   DOCUMENTS
   ============================== */
.upload-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-xl) 48px;
}

.doc-row {
	display: grid;
	grid-template-columns: 1fr 200px;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid #f1f5f9;
}

.doc-row:last-child {
	border-bottom: none;
}

.doc-row .doc-label {
	font-weight: 600;
	color: var(--ink);
	font-size: 0.9rem;
}

.doc-row .doc-label small {
	display: block;
	font-weight: 400;
	color: var(--muted);
	font-size: 0.78rem;
	margin-top: 2px;
}

/* Styled Document Upload List */
.doc-upload-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.doc-upload-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	border-bottom: 1px solid #f1f5f9;
	transition: background var(--transition);
	border-radius: 0;
}

.doc-upload-item:last-child {
	border-bottom: none;
}

.doc-upload-item:hover {
	background: rgba(59, 130, 246, .03);
}

.doc-upload-item.has-file {
	background: rgba(34, 197, 94, .04);
}

.doc-upload-item.has-file .doc-upload-icon {
	background: linear-gradient(135deg, #22c55e, #16a34a);
}

.doc-upload-item.has-file .doc-upload-status {
	color: #16a34a;
	font-weight: 600;
}

.doc-upload-info {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1;
	min-width: 0;
}

.doc-upload-icon {
	width: 42px;
	height: 42px;
	border-radius: var(--radius-sm);
	background: linear-gradient(135deg, var(--primary-600), var(--teal-600));
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	flex-shrink: 0;
	transition: background var(--transition);
}

.doc-upload-text {
	min-width: 0;
}

.doc-upload-name {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--ink);
	line-height: 1.3;
}

.doc-upload-name small {
	font-weight: 400;
	color: var(--muted);
	font-size: 0.78rem;
	display: block;
	margin-top: 1px;
}

.doc-upload-status {
	font-size: 0.78rem;
	color: var(--muted-light);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 280px;
}

.doc-upload-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 20px;
	background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.82rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition);
	white-space: nowrap;
	flex-shrink: 0;
	box-shadow: var(--shadow-xs);
	letter-spacing: .2px;
}

.doc-upload-btn:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
	filter: brightness(1.05);
}

.doc-upload-btn:active {
	transform: translateY(0);
}

.doc-upload-input {
	display: none;
}

@media (max-width: 520px) {
	.doc-upload-item {
		flex-wrap: wrap;
		padding: 14px 12px;
		gap: 10px;
	}
	.doc-upload-info {
		flex: 1 1 100%;
	}
	.doc-upload-btn {
		width: 100%;
		padding: 12px 20px;
	}
	.doc-upload-icon {
		width: 36px;
		height: 36px;
		font-size: 1rem;
	}
	.doc-upload-status {
		max-width: 180px;
	}
}

/* ==============================
   RADIO LIST
   ============================== */
.radio-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 24px;
}

.radio-list li {
	margin: 0;
}

.radio-list label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 500;
	font-size: 0.9rem;
	padding: 8px 12px;
	border-radius: var(--radius-xs);
	transition: background var(--transition);
}

.radio-list label:hover {
	background: var(--surface);
}

.radio-list input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--primary-600);
}

/* RANK SELECTION LAYOUT WITH CSC VIEW BUTTONS */
.rank-selection-layout {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.rank-selection-left {
	flex: 1;
	min-width: 0;
}

.rank-selection-right {
	flex: 1;
	min-width: 260px;
	background: var(--surface);
	border-radius: var(--radius);
	padding: 20px 24px;
	border: 1px solid rgba(226, 232, 240, .8);
}

.csc-title {
	margin: 0 0 16px;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.5px;
	color: var(--teal-700);
	text-transform: uppercase;
}

.csc-placeholder {
	font-size: 0.9rem;
	color: var(--muted);
	line-height: 1.5;
}

.csc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.csc-table th {
	text-align: left;
	padding: 12px 14px;
	font-weight: 800;
	color: var(--ink);
	white-space: nowrap;
	vertical-align: top;
	width: 110px;
	border-bottom: 2px solid rgba(226, 232, 240, .8);
	background: rgba(241, 245, 249, .5);
}

.csc-table td {
	padding: 12px 14px;
	color: var(--ink-light);
	line-height: 1.55;
	border-bottom: 2px solid rgba(226, 232, 240, .8);
}

.radio-list--ranks {
	grid-template-columns: 1fr !important;
	gap: 2px !important;
}

.radio-list--ranks li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.radio-list--ranks li label {
	flex: 1;
	min-width: 0;
}

.btn-view-csc {
	background: linear-gradient(180deg, #00d4ff, #00b4d8);
	color: #fff;
	border: none;
	padding: 6px 20px;
	border-radius: 4px;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	text-transform: lowercase;
	letter-spacing: 0.3px;
}

.btn-view-csc:hover {
	background: linear-gradient(180deg, #00e5ff, #00c4e8);
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(0, 180, 216, 0.35);
}

.btn-view-csc:active {
	transform: translateY(0);
}

/* CSC Modal */
.csc-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.csc-modal-overlay.csc-modal--open {
	display: flex;
}

.csc-modal {
	background: #fff;
	border-radius: var(--radius-lg);
	max-width: 560px;
	width: 100%;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	animation: cscModalIn 0.25s ease;
}

@keyframes cscModalIn {
	from { opacity: 0; transform: scale(0.95) translateY(10px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

.csc-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 24px;
	background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
	color: #fff;
}

.csc-modal-header h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.csc-modal-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
	opacity: 0.8;
	transition: opacity 0.2s;
}

.csc-modal-close:hover {
	opacity: 1;
}

.csc-modal-body {
	padding: 20px 24px 28px;
}

.csc-modal-body .csc-table th {
	width: 120px;
}

@media (max-width: 768px) {
	.rank-selection-layout {
		flex-direction: column;
	}
	.rank-selection-right {
		display: none;
	}
}

@media (max-width: 520px) {
	.btn-view-csc {
		padding: 5px 14px;
		font-size: 0.75rem;
	}
}

/* ==============================
   TABLES
   ============================== */
.table-wrap {
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border: 1px solid rgba(226, 232, 240, .8);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table th,
.table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #f1f5f9;
}

.table th {
	background: var(--surface-warm);
	font-weight: 700;
	font-size: 0.78rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .6px;
}

.table tbody tr {
	transition: background var(--transition);
}

.table tbody tr:hover {
	background: rgba(37, 99, 235, .02);
}

.table tbody tr:last-child td {
	border-bottom: none;
}

.row-actions {
	text-align: right;
}

/* ==============================
   UTILITIES
   ============================== */
.card {
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: var(--space-lg);
	border: 1px solid rgba(226, 232, 240, .8);
}

.action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: var(--space-lg);
}

.action-row .btn {
	flex-shrink: 0;
}

/* ==============================
   MOBILE NAV
   ============================== */
.nav-toggle {
	display: none;
	padding: 8px 14px;
	min-height: 40px;
	min-width: 40px;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.12);
	color: var(--white);
	border: 1px solid rgba(255,255,255,.15);
	border-radius: var(--radius-xs);
	font-family: inherit;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	transition: all var(--transition);
	backdrop-filter: blur(4px);
}

.nav-toggle:hover {
	background: rgba(255,255,255,.2);
}

.nav-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 98;
	backdrop-filter: blur(2px);
}

body.nav-open .nav-backdrop {
	display: block;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 900px) {
	.nav-toggle {
		display: inline-flex;
	}
	.app-shell {
		grid-template-columns: 1fr;
	}
	.side-nav {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 260px;
		max-width: 85vw;
		z-index: 100;
		transform: translateX(-100%);
		transition: transform .25s ease-out;
		box-shadow: 4px 0 20px rgba(0,0,0,.15);
	}
	.side-nav.side-nav--open {
		transform: translateX(0);
	}
	.upload-grid {
		grid-template-columns: 1fr;
	}
	.radio-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.brand-title {
		font-size: 20px;
	}
	.brand-subtitle {
		font-size: 11px;
		white-space: normal;
		word-break: break-word;
		line-height: 1.3;
	}
	.header-inner {
		padding: 12px 16px;
		gap: 10px;
	}
	.brand {
		flex: 1 1 60%;
		min-width: 0;
	}
	.btn-admin,
	a.btn-admin {
		flex-shrink: 0;
		padding: 8px 14px;
		font-size: 0.8rem;
	}
	.brand-logo {
		width: 42px;
		height: 42px;
	}
	.content {
		padding: 24px 16px 60px;
	}
	.main-panel {
		padding: 20px 16px;
	}
	.doc-row {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.profile-summary {
		grid-template-columns: 70px 1fr;
		gap: 14px;
		padding: 16px;
	}
	.placeholder-avatar,
	.profile-avatar-wrap {
		width: 70px;
		height: 70px;
	}
	.table th,
	.table td {
		padding: 10px 12px;
		font-size: 0.85rem;
	}
	.btn {
		min-height: 44px;
		padding: 12px 18px;
	}
	.section-card {
		padding: 20px 18px;
		border-radius: var(--radius);
	}
	.login-card {
		padding: 28px 20px;
	}
}
