/* assets/css/mainstyle.css */

html,
body {
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	background: #f4f6f8;
	color: #1f2937;
}

body {
	min-height: 100vh;
}

a {
	color: #1f3c71;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

label {
	display: block;
	font-weight: bold;
	margin-bottom: 6px;
}

input,
select,
textarea {
	width: 100%;
	padding: 10px;
	margin-bottom: 16px;
	border: 1px solid #c9d1dc;
	border-radius: 4px;
	box-sizing: border-box;
	font-size: 16px;
	font-family: inherit;
}

textarea {
	min-height: 100px;
	resize: vertical;
}

.primary-button {
	padding: 12px 16px;
	background: #1f3c71;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
}

.primary-button:hover {
	background: #172f59;
}

.primary-button:disabled {
	background: #9aa8bd;
	cursor: not-allowed;
}

.error-message {
	background: #f8d7da;
	color: #842029;
	border: 1px solid #f5c2c7;
	padding: 10px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.success-message {
	background: #d1e7dd;
	color: #0f5132;
	border: 1px solid #badbcc;
	padding: 10px;
	border-radius: 4px;
	margin-bottom: 16px;
}

/* Login Page */

.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f6f8;
}

.login-card {
	width: 100%;
	max-width: 400px;
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 30px;
	box-sizing: border-box;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
	margin-top: 0;
	color: #1f3c71;
	font-size: 28px;
}

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

/* Dashboard Layout */

.dashboard-page {
	height: 100vh;
	overflow: hidden;
	background: #f4f6f8;
}

.app-header {
	height: 60px;
	background: #ffffff;
	border-bottom: 1px solid #d9dee5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	box-sizing: border-box;
}

.app-title h1 {
	margin: 0;
	font-size: 22px;
	color: #1f3c71;
}

.user-menu {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 14px;
}

.logout-link {
	font-weight: bold;
}

.app-shell {
	display: flex;
	height: calc(100vh - 60px);
	width: 100%;
	overflow: hidden;
}

.time-panel {
	width: 40%;
	min-width: 360px;
	background: #ffffff;
	border-right: 1px solid #d9dee5;
	padding: 20px;
	box-sizing: border-box;
	overflow-y: auto;
}

.messaging-panel {
	width: 60%;
	display: flex;
	background: #f8f9fb;
	overflow: hidden;
}

.panel-header h2,
.chat-header h2,
.sidebar-header h3 {
	margin-top: 0;
}

.panel-header h2 {
	color: #1f3c71;
}

.timer-card,
.entries-card {
	background: #f8f9fb;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.timer-display {
	font-size: 36px;
	font-weight: bold;
	margin-bottom: 16px;
	color: #1f3c71;
}

.timer-actions {
	display: flex;
	gap: 10px;
}

.timer-actions button {
	flex: 1;
}

.secondary-button {
	padding: 12px 16px;
	background: #75787b;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
}

.secondary-button:hover {
	background: #5f6265;
}

.secondary-button:disabled {
	background: #b8bdc3;
	cursor: not-allowed;
}

.small-button {
	padding: 6px 10px;
	background: #1f3c71;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
}

.section-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.section-title-row h3 {
	margin: 0;
	color: #1f3c71;
}

.time-entries {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.time-entry {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 6px;
	padding: 10px;
}

.time-entry-title {
	font-weight: bold;
	margin-bottom: 4px;
}

.time-entry-meta {
	font-size: 13px;
	color: #5f6265;
}

.channels-sidebar {
	width: 220px;
	background: #1f3c71;
	color: #ffffff;
	padding: 16px;
	box-sizing: border-box;
	overflow-y: auto;
}

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

.channel-item {
	padding: 8px 10px;
	border-radius: 4px;
	cursor: pointer;
	color: #ffffff;
}

.channel-item:hover,
.channel-item.active {
	background: rgba(255, 255, 255, 0.18);
}

.chat-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.chat-header {
	padding: 16px 20px;
	background: #ffffff;
	border-bottom: 1px solid #d9dee5;
	box-sizing: border-box;
}

.chat-header h2 {
	margin: 0;
	color: #1f3c71;
	font-size: 20px;
}

.message-list {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	box-sizing: border-box;
}

.message {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 6px;
	padding: 10px;
	margin-bottom: 10px;
}

.message-author {
	font-weight: bold;
	color: #1f3c71;
}

.message-time {
	font-size: 12px;
	color: #75787b;
	margin-left: 8px;
}

.message-text {
	margin-top: 6px;
}

.message-composer {
	display: flex;
	gap: 10px;
	padding: 16px;
	background: #ffffff;
	border-top: 1px solid #d9dee5;
	box-sizing: border-box;
}

.message-composer input {
	margin-bottom: 0;
}

.message-composer button {
	width: auto;
	white-space: nowrap;
}

.empty-state {
	color: #75787b;
	font-size: 14px;
	padding: 10px 0;
}

.empty-state.light {
	color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 900px) {
	.dashboard-page {
		height: auto;
		overflow: auto;
	}

	.app-shell {
		flex-direction: column;
		height: auto;
		overflow: visible;
	}

	.time-panel,
	.messaging-panel {
		width: 100%;
		min-width: 0;
		height: 50vh;
	}

	.channels-sidebar {
		width: 160px;
	}

	.app-header {
		flex-direction: column;
		align-items: flex-start;
		height: auto;
		gap: 8px;
		padding: 12px 20px;
	}
}

/* Reports */

.report-page {
	background: #f4f6f8;
	min-height: 100vh;
}

.report-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px;
	box-sizing: border-box;
}

.report-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.report-header h2 {
	margin: 0;
	color: #1f3c71;
}

.report-total {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 6px;
	padding: 10px 14px;
	font-weight: bold;
	color: #1f3c71;
}

.report-filters {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.filter-field input,
.filter-field select {
	margin-bottom: 0;
}

.filter-actions {
	display: flex;
	align-items: flex-end;
}

.filter-actions .primary-button {
	width: 100%;
}

.report-card {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	box-sizing: border-box;
	overflow-x: auto;
}

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

.report-table th,
.report-table td {
	padding: 10px;
	border-bottom: 1px solid #d9dee5;
	text-align: left;
	vertical-align: top;
}

.report-table th {
	color: #1f3c71;
	background: #f8f9fb;
}

.report-table tfoot th {
	background: #eef2f7;
}

@media (max-width: 900px) {
	.report-filters {
		grid-template-columns: 1fr;
	}

	.report-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Report Export */

.report-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.secondary-link-button {
	display: inline-block;
	padding: 10px 14px;
	background: #75787b;
	color: #ffffff;
	border-radius: 4px;
	font-weight: bold;
	text-decoration: none;
	white-space: nowrap;
}

.secondary-link-button:hover {
	background: #5f6265;
	text-decoration: none;
}

@media (max-width: 900px) {
	.report-header-actions {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Admin */

.admin-page {
	background: #f4f6f8;
	min-height: 100vh;
}

.admin-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px;
	box-sizing: border-box;
}

.admin-header {
	margin-bottom: 20px;
}

.admin-header h2 {
	margin: 0;
	color: #1f3c71;
}

.admin-stats-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

.admin-stat-card {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	box-sizing: border-box;
}

.admin-stat-label {
	font-size: 14px;
	color: #75787b;
	margin-bottom: 8px;
}

.admin-stat-value {
	font-size: 30px;
	font-weight: bold;
	color: #1f3c71;
}

.admin-card {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	box-sizing: border-box;
	margin-bottom: 20px;
	overflow-x: auto;
}

.admin-card h3 {
	margin: 0;
	color: #1f3c71;
}

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

.admin-table th,
.admin-table td {
	padding: 10px;
	border-bottom: 1px solid #d9dee5;
	text-align: left;
	vertical-align: top;
}

.admin-table th {
	color: #1f3c71;
	background: #f8f9fb;
}

@media (max-width: 1100px) {
	.admin-stats-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 700px) {
	.admin-stats-grid {
		grid-template-columns: 1fr;
	}
}

/* Admin Forms */

.admin-form-card {
	max-width: 760px;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.form-field input,
.form-field select,
.form-field textarea {
	margin-bottom: 0;
}

.form-field-full {
	grid-column: 1 / -1;
}

.checkbox-field label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: normal;
}

.checkbox-field input {
	width: auto;
	margin-bottom: 0;
}

.form-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
}

@media (max-width: 700px) {
	.form-grid {
		grid-template-columns: 1fr;
	}

	.form-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.form-actions .primary-button,
	.form-actions .secondary-link-button {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}
}

/* Inline Admin Actions */

.inline-form {
	display: inline-block;
	margin: 0;
}

.small-secondary-button {
	padding: 6px 10px;
	background: #75787b;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
}

.small-secondary-button:hover {
	background: #5f6265;
}

.small-secondary-button:disabled {
	background: #b8bdc3;
	cursor: not-allowed;
}

/* Small Link Buttons */

.small-link-button {
	display: inline-block;
	padding: 6px 10px;
	background: #1f3c71;
	color: #ffffff;
	border-radius: 4px;
	font-size: 13px;
	text-decoration: none;
	margin-right: 6px;
}

.small-link-button:hover {
	background: #172f59;
	text-decoration: none;
}

/* Danger Actions */

.danger-button {
	padding: 12px 16px;
	background: #842029;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
}

.danger-button:hover {
	background: #6c1a21;
}

.small-danger-link-button {
	display: inline-block;
	padding: 6px 10px;
	background: #842029;
	color: #ffffff;
	border-radius: 4px;
	font-size: 13px;
	text-decoration: none;
	margin-right: 6px;
}

.small-danger-link-button:hover {
	background: #6c1a21;
	text-decoration: none;
}

.warning-box {
	background: #fff3cd;
	color: #664d03;
	border: 1px solid #ffecb5;
	padding: 10px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.detail-list {
	background: #f8f9fb;
	border: 1px solid #d9dee5;
	border-radius: 6px;
	padding: 12px;
	margin-bottom: 16px;
}

.detail-list div {
	margin-bottom: 8px;
}

.detail-list div:last-child {
	margin-bottom: 0;
}

/* Admin Header Actions */

.admin-header-with-action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.primary-link-button {
	display: inline-block;
	padding: 10px 14px;
	background: #1f3c71;
	color: #ffffff;
	border-radius: 4px;
	font-weight: bold;
	text-decoration: none;
	white-space: nowrap;
}

.primary-link-button:hover {
	background: #172f59;
	text-decoration: none;
}

.muted-text {
	color: #75787b;
	font-size: 13px;
}

@media (max-width: 700px) {
	.admin-header-with-action {
		flex-direction: column;
		align-items: flex-start;
	}

	.primary-link-button {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}
}

/* Channel Members */

.admin-add-member-form {
	margin: 0;
}

.inline-control-row {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.inline-control-row select {
	margin-bottom: 0;
}

.inline-control-row .primary-button {
	white-space: nowrap;
}

@media (max-width: 700px) {
	.inline-control-row {
		flex-direction: column;
		align-items: stretch;
	}
}

/* Admin Message Management */

.admin-message-filters {
	grid-template-columns: repeat(5, 1fr);
	margin-bottom: 0;
}

.message-preview-cell {
	max-width: 420px;
	white-space: normal;
	word-break: break-word;
}

@media (max-width: 1100px) {
	.admin-message-filters {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 700px) {
	.admin-message-filters {
		grid-template-columns: 1fr;
	}
}

/* Delete Message Preview */

.message-delete-preview {
	background: #f8f9fb;
	border: 1px solid #d9dee5;
	border-radius: 6px;
	padding: 12px;
	margin-bottom: 16px;
	white-space: normal;
	word-break: break-word;
}

/* Admin Time Entries */

.admin-time-entry-filters {
	grid-template-columns: repeat(6, 1fr);
	margin-bottom: 0;
}

.admin-total-inline {
	display: inline-block;
	margin-bottom: 16px;
}

@media (max-width: 1200px) {
	.admin-time-entry-filters {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 700px) {
	.admin-time-entry-filters {
		grid-template-columns: 1fr;
	}
}

/* Field Help Text */

.field-help {
	font-size: 13px;
	color: #75787b;
	margin-top: 6px;
}

/* Admin Toolbar */

.admin-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.admin-toolbar a {
	display: inline-block;
	padding: 9px 12px;
	background: #1f3c71;
	color: #ffffff;
	border-radius: 4px;
	font-size: 14px;
	font-weight: bold;
	text-decoration: none;
}

.admin-toolbar a:hover {
	background: #172f59;
	text-decoration: none;
}

@media (max-width: 700px) {
	.admin-toolbar {
		flex-direction: column;
	}

	.admin-toolbar a {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}
}

/* Manual Time Entry */

.manual-entry-card {
	background: #f8f9fb;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.manual-entry-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.compact-actions {
	margin-top: 4px;
}

.compact-actions .primary-button,
.compact-actions .secondary-button {
	width: auto;
}

/* Messaging Sidebar Enhancements */

.sidebar-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.25);
	margin: 18px 0;
}

.direct-message-user-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.direct-message-user-item {
	padding: 8px 10px;
	border-radius: 4px;
	cursor: pointer;
	color: #ffffff;
}

.direct-message-user-item:hover,
.direct-message-user-item.active {
	background: rgba(255, 255, 255, 0.18);
}

.chat-subtitle {
	font-size: 13px;
	color: #75787b;
	margin-top: 4px;
}

@media (max-width: 700px) {
	.manual-entry-grid {
		grid-template-columns: 1fr;
	}
}

/* Dashboard Time Entry Editing */

.edit-time-entry-panel {
	background: #ffffff;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.hidden-panel {
	display: none;
}

.time-entry-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.small-danger-button {
	padding: 6px 10px;
	background: #842029;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
}

.small-danger-button:hover {
	background: #6c1a21;
}

@media (max-width: 700px) {
	.time-entry-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.time-entry-actions .small-button,
	.time-entry-actions .small-danger-button {
		width: 100%;
	}
}