/* --- Base --- */
body,
html {
	margin: 0;
	padding: 0;
	font-family: 'Menlo', monospace;
	background: #1c1c1c;
	color: #d4f8d4;
}

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

.terminal-card {
	backdrop-filter: blur(8px);
	background: rgba(28, 28, 28, 0.85);
	padding: 20px;
	border-radius: 15px;
	width: 95%;
	max-width: 1100px;
	box-shadow: 0 0 15px rgba(124, 255, 124, 0.15);
}

/* --- Header --- */
.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

.header h1 {
	margin: 0;
	font-size: 2em;
	color: #7cff7c;
}

.header .sub {
	margin: 0;
	color: #aaffaa;
	font-size: 0.9em;
}

/* --- Buttons & Inputs --- */
.header-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 10px;
}

.top-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.columns-menu {
	display: flex;
	margin-left: auto;
	gap: 5px;
	align-items: center;
}

#searchInput {
	padding: 5px 10px;
	border-radius: 5px;
	border: 1px solid rgba(124, 255, 124, 0.3);
	background: rgba(255, 255, 255, 0.05);
	color: #d4f8d4;
	flex: 1;
	min-width: 150px;
}

.btn {
	padding: 5px 12px;
	border: none;
	border-radius: 5px;
	font-family: inherit;
	cursor: pointer;
	transition: 0.2s;
}

.btn:hover {
	opacity: 0.85;
}

.btn.subtle {
	background: rgba(255, 255, 255, 0.05);
	color: #d4f8d4;
}

.btn.accent {
	background: #7cff7c;
	color: #1c1c1c;
	font-weight: bold;
}

.btn.danger {
	background: #ff4040;
	color: #fff;
}

.btn.small {
	padding: 2px 5px;
	font-size: 0.8em;
}

/* Highlight toggled buttons */
.btn.accent.toggled {
	box-shadow: 0 0 5px #7cff7c inset;
}

/* --- Calendar --- */
.calendar-section {
	margin-top: 20px;
}

.calendar-header {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-bottom: 5px;
}

.calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	margin-bottom: 5px;
	color: #aaffaa;
	font-weight: bold;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}

.calendar-cell {
	background: rgba(28, 28, 28, 0.85);
	padding: 5px;
	border-radius: 5px;
	text-align: center;
	cursor: pointer;
	position: relative;
	min-height: 50px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	transition: 0.2s;
	overflow: hidden;
}

.calendar-cell:hover {
	background: rgba(124, 255, 124, 0.1);
}

.calendar-cell.has-calls .cell-names span {
	font-weight: bold;
}

.calendar-cell.selected {
	border: 1px solid #7cff7c;
}

.cell-names {
	font-size: 0.7em;
	margin-top: 3px;
	max-height: 55px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-right: 2px;
}

.cell-names span {
	cursor: pointer;
	text-align: left;
	padding: 1px 3px;
	border-radius: 3px;
	transition: 0.15s;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: visible;
}

.cell-names span:hover {
	background: #7cff7c;
	color: #1c1c1c;
}

.cell-names span.followup {
	background: red;
	color: #fff;
}

/* --- Table --- */
.table-wrapper {
	max-height: 350px;
	overflow-y: auto;
	border: 1px solid rgba(124, 255, 124, 0.3);
	border-radius: 5px;
}

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

.call-table th,
.call-table td {
	border: 1px solid rgba(124, 255, 124, 0.25);
	padding: 5px;
	text-align: left;
	font-size: 0.9em;
	vertical-align: top;
	white-space: pre-wrap;
	word-break: break-word;
}

.call-table th {
	background: rgba(28, 28, 28, 0.9);
	color: #7cff7c;
	position: sticky;
	top: 0;
	z-index: 2;
}

.actions-col button {
	margin-right: 3px;
}

/* --- Columns dropdown --- */
.columns-dropdown {
	position: absolute;
	top: 30px;
	right: 0;
	background: rgba(28, 28, 28, 0.95);
	padding: 10px;
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(124, 255, 124, 0.2);
	max-width: 200px;
}

.columns-dropdown label {
	display: block;
	font-size: 0.85em;
	margin: 3px 0;
	cursor: pointer;
}

.hidden {
	display: none !important;
}

.dropdown-actions {
	margin-top: 5px;
	text-align: right;
}

/* --- Modal --- */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 999;
}

.modal-content {
	background: rgba(28, 28, 28, 0.95);
	padding: 20px;
	border-radius: 15px;
	backdrop-filter: blur(12px);
	width: 90%;
	max-width: 600px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.close-btn {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 1.5em;
	color: #7cff7c;
	cursor: pointer;
}

/* --- Modal Form --- */
.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	align-items: center;
}

.form-grid label {
	margin-bottom: 3px;
}

.form-grid textarea {
	grid-column: 1 / -1;
}

.form-actions {
	grid-column: 1 / -1;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 5px;
}

/* --- Modal small text --- */
.small-text {
	font-size: 0.7em;
	color: #aaa;
	margin-top: 3px;
	text-align: right;
}