/* Global Styles and Variables */
:root {
	--primary-gold: #fdb913;
	--primary-gold-dark: #e5a711;
	--primary-gold-light: #ffca3a;
	--bg-dark: #000000;
	--bg-dark-secondary: #1a1a1a;
	--bg-dark-tertiary: #2a2a2a;
	--text-primary: #ffffff;
	--text-secondary: #b0b0b0;
	--text-tertiary: #808080;
	--success-green: #10b981;
	--error-red: #ef4444;
	--border-color: #333333;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, sans-serif;
	background-color: var(--bg-dark);
	color: var(--text-primary);
	line-height: 1.6;
	min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 600;
	line-height: 1.3;
}

h1 {
	font-size: 2rem;
}
h2 {
	font-size: 1.5rem;
}
h3 {
	font-size: 1.25rem;
}

/* Container */
.container {
	max-width: 480px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* Topbar */
.topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background-color: var(--bg-dark);
	border-bottom: 1px solid var(--border-color);
	padding: 1rem;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.topbar-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.user-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(
		135deg,
		var(--primary-gold),
		var(--primary-gold-dark)
	);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 1rem;
	color: var(--bg-dark);
	cursor: pointer;
	transition: transform 0.2s;
}

.user-avatar:hover {
	transform: scale(1.05);
}

.topbar-center {
	flex: 1;
	text-align: center;
}

.service-name {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
}

.topbar-right {
	display: flex;
	align-items: center;
}

.help-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--bg-dark-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s;
	text-decoration: none;
	color: var(--text-primary);
	font-size: 1.25rem;
}

.help-icon:hover {
	background-color: var(--bg-dark-tertiary);
}

/* Bottom Navigation */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: var(--bg-dark);
	border-top: 1px solid var(--border-color);
	padding: 0.5rem 0;
	z-index: 100;
	display: flex;
	justify-content: space-around;
	align-items: center;
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	text-decoration: none;
	color: var(--text-tertiary);
	font-size: 0.8rem;
	transition: color 0.2s;
	padding: 0.25rem 1rem;
}

.nav-item p {
	font-weight: 600;
}

.nav-item.active {
	color: var(--primary-gold);
}

.nav-item:hover {
	color: var(--text-secondary);
}

.nav-icon {
	font-size: 1rem;
}

/* Main Content */
.main-content {
	padding-top: 72px;
	padding-bottom: 80px;
	min-height: 100vh;
}

/* Profile Modal */
.profile-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--bg-dark);
	z-index: 200;
	display: none;
	flex-direction: column;
	animation: slideUp 0.3s ease-out;
}

.profile-modal.active {
	display: flex;
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

.profile-header {
	display: flex;
	align-items: center;
	padding: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.back-button {
	background: none;
	border: none;
	color: var(--text-primary);
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0.5rem;
	margin-right: 1rem;
}

.profile-title {
	font-size: 1.25rem;
	font-weight: 600;
}

.profile-content {
	flex: 1;
	overflow-y: auto;
	padding: 2rem 1rem;
}

.profile-avatar-large {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--success-green), #059669);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 3rem;
	color: var(--text-primary);
	margin: 0 auto 1.5rem;
}

.profile-info {
	text-align: center;
	margin-bottom: 2rem;
}

.profile-name {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.profile-email {
	color: var(--text-secondary);
	margin-bottom: 1rem;
}

.profile-department {
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

.profile-badges {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.badge {
	padding: 0.5rem 1rem;
	border-radius: 20px;
	font-size: 0.875rem;
	font-weight: 500;
}

.badge-delegate {
	background-color: var(--bg-dark-secondary);
	color: var(--text-primary);
}

.badge-worker {
	background-color: rgba(253, 185, 19, 0.2);
	color: var(--primary-gold);
}

.logout-button {
	width: 100%;
	padding: 1rem;
	background-color: var(--bg-dark-secondary);
	border: none;
	border-radius: 12px;
	color: var(--text-primary);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	transition: background-color 0.2s;
}

.logout-button:hover {
	background-color: var(--bg-dark-tertiary);
}

.version-text {
	text-align: center;
	color: var(--text-tertiary);
	font-size: 0.875rem;
}

/* Home Page */
.home-header {
	text-align: center;
	padding: 2rem 1rem 1rem;
}

.current-time {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 0.2rem;
}

.current-date {
	font-size: 1rem;
	color: var(--text-secondary);
}

.clock-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2rem 1rem;
}

.clock-button {
	width: 200px;
	height: 200px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	font-size: 1rem;
	font-weight: 600;
	transition: all 0.3s;
	position: relative;
}

.clock-button.inactive {
	background-color: var(--bg-dark-secondary);
	color: var(--text-tertiary);
}

.clock-button.active {
	background-color: var(--primary-gold);
	color: var(--bg-dark);
	animation: glow 2s infinite;
}

.clock-button.clocked-in {
	background-color: var(--error-red);
	color: var(--text-primary);
	animation: glow-red 2s infinite;
}

@keyframes glow {
	0%,
	100% {
		box-shadow: 0 0 20px rgba(253, 185, 19, 0.5);
	}
	50% {
		box-shadow: 0 0 40px rgba(253, 185, 19, 0.8);
	}
}

@keyframes glow-red {
	0%,
	100% {
		box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
	}
	50% {
		box-shadow: 0 0 40px rgba(239, 68, 68, 0.8);
	}
}

.clock-icon {
	font-size: 4rem;
}

.service-location {
	text-align: center;
	padding: 1rem;
	margin: 1rem;
	background-color: var(--bg-dark-secondary);
	border-radius: 12px;
}

.location-label {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-bottom: 0.25rem;
}

.location-text {
	font-size: 1rem;
	font-weight: 500;
}

.attendance-stats {
	padding: 1rem;
	margin: 1rem;
	background-color: var(--bg-dark-secondary);
	border-radius: 12px;
	display: flex;
	justify-content: space-around;
	align-items: stretch;
	gap: 1rem;
}

.stat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.05rem;
	flex: 1;
	padding: 0.01rem 0.01rem;
}

.stat-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.05rem;
}

.stat-icon-clockin {
	color: var(--primary-gold);
}

.stat-icon-clockout {
	color: var(--error-red);
}

.stat-icon-timespent {
	color: var(--primary-gold);
}

.stat-value {
	font-weight: 600;
	font-size: 1rem;
	color: var(--text-primary);
}

.stat-label {
	color: var(--text-secondary);
	font-size: 0.875rem;
	text-align: center;
}

/* Progress Section */
.progress-section,
.tickets-section {
	margin-bottom: 2rem;
}

.section-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1rem;
	padding: 0.5rem 0;
}

/* Progress Card */
.progress-card {
	background-color: var(--bg-dark-secondary);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
	border: 1px solid var(--border-color);
}

.progress-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.tickets-earned-badge {
	background-color: rgba(253, 185, 19, 0.2);
	color: var(--primary-gold);
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.875rem;
	font-weight: 600;
}

.progress-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.875rem;
}

.progress-text {
	color: var(--text-secondary);
}

.progress-percentage {
	font-weight: 600;
	color: var(--primary-gold);
}

.progress-bar {
	width: 100%;
	height: 8px;
	background-color: var(--bg-dark-tertiary);
	border-radius: 4px;
	overflow: hidden;
}

.progress-bar-fill {
	height: 100%;
	background: linear-gradient(
		90deg,
		var(--primary-gold),
		var(--primary-gold-light)
	);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.progress-message {
	font-size: 0.875rem;
	color: var(--text-secondary);
	text-align: center;
}

/* Ticket Card */
.ticket-card {
	background-color: var(--bg-dark-secondary);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
	border: 2px solid var(--border-color);
	transition: all 0.3s;
}

.ticket-card.ticket-active {
	border-color: var(--primary-gold);
	box-shadow: 0 0 20px rgba(253, 185, 19, 0.2);
}

.ticket-card.ticket-redeemed {
	opacity: 0.6;
}

.ticket-card-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.ticket-icon {
	font-size: 2.5rem;
}

.ticket-info {
	flex: 1;
}

.ticket-service {
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 0.25rem;
}

.ticket-date {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.ticket-status {
	margin-left: auto;
}

.ticket-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ticket-redeemed-text {
	text-align: center;
	color: var(--text-secondary);
	font-size: 0.875rem;
}

/* QR Modal */
.qr-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 300;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.qr-modal.active {
	display: flex;
}

.qr-modal-content {
	background-color: var(--bg-dark-secondary);
	border-radius: 16px;
	padding: 2rem;
	max-width: 400px;
	width: 100%;
	position: relative;
	text-align: center;
}

.qr-close-button {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: none;
	border: none;
	color: var(--text-primary);
	font-size: 2rem;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s;
}

.qr-close-button:hover {
	background-color: var(--bg-dark-tertiary);
}

.qr-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
}

.qr-code-container {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 1.5rem;
	padding: 1rem;
	background-color: white;
	border-radius: 12px;
}

.qr-code-container canvas {
	max-width: 100%;
	height: auto;
}

.qr-instructions {
	font-size: 0.875rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

/* Auth Pages */
.auth-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.auth-logo {
	width: 120px;
	height: 120px;
	margin-bottom: 2rem;
}

.auth-title {
	font-size: 1.75rem;
	font-weight: 700;
	text-align: center;
	margin-bottom: 0.5rem;
}

.auth-subtitle {
	font-size: 1rem;
	color: var(--text-secondary);
	text-align: center;
	margin-bottom: 2rem;
}

.auth-form {
	width: 100%;
	max-width: 400px;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.form-label .required {
	color: var(--error-red);
}

.form-input {
	width: 100%;
	padding: 1rem;
	background-color: var(--bg-dark-secondary);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	color: var(--text-primary);
	font-size: 1rem;
	transition: border-color 0.2s;
}

.form-input:focus {
	outline: none;
	border-color: var(--primary-gold);
}

.form-input::placeholder {
	color: var(--text-tertiary);
}

.form-select {
	width: 100%;
	padding: 1rem;
	background-color: var(--bg-dark-secondary);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	color: var(--text-primary);
	font-size: 1rem;
	cursor: pointer;
}

.form-radio {
	width: 100%;
	padding: 1rem;
	background-color: var(--bg-dark-secondary);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	color: var(--text-primary);
	font-size: 1rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.form-radio input {
	cursor: pointer;
}

.input-icon {
	position: relative;
}

.input-icon input {
	padding-left: 3rem;
}

.input-icon .icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-tertiary);
	font-size: 1.25rem;
}

.btn {
	/* width: 100%; */
	padding: 8px 10px;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	/* font-weight: 600; */
	cursor: pointer;
	font-size: 14px;
	transition: all 0.2s;
}

.btn-primary {
	background-color: var(--primary-gold);
	color: var(--bg-dark);
}

.btn-primary:hover {
	background-color: var(--primary-gold-dark);
}

.btn-secondary {
	background-color: transparent;
	color: var(--primary-gold);
	border: 2px solid var(--primary-gold);
}

.btn-secondary:hover {
	background-color: rgba(253, 185, 19, 0.1);
}

.btn-success {
	background-color: var(--success-green);
	color: var(--bg-dark);
}

.btn-success:hover {
	background-color: #059669;
}

.auth-link {
	text-align: center;
	margin-top: 1.5rem;
	color: var(--text-secondary);
}

.auth-link a {
	color: var(--primary-gold);
	text-decoration: none;
	font-weight: 500;
}

.auth-link a:hover {
	text-decoration: underline;
}

/* OTP Input */
.otp-container {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin: 2rem 0;
}

.otp-input {
	width: 50px;
	height: 60px;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 600;
	background-color: var(--bg-dark-secondary);
	border: 2px solid var(--border-color);
	border-radius: 8px;
	color: var(--text-primary);
}

.otp-input:focus {
	outline: none;
	border-color: var(--primary-gold);
}

/* Success/Error Messages */
.message {
	padding: 1rem;
	border-radius: 12px;
	margin-bottom: 1rem;
	text-align: center;
}

.message-success {
	background-color: rgba(16, 185, 129, 0.1);
	color: var(--success-green);
	border: 1px solid var(--success-green);
}

.message-error {
	background-color: rgba(239, 68, 68, 0.1);
	color: var(--error-red);
	border: 1px solid var(--error-red);
}

/* Loading Spinner */
.spinner {
	border: 3px solid var(--bg-dark-secondary);
	border-top: 3px solid var(--primary-gold);
	border-radius: 50%;
	/* width: 40px;
	height: 40px; */
	animation: spin 1s linear infinite;
	margin: 2rem auto;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Utility Classes */
.hidden {
	display: none !important;
}

.text-center {
	text-align: center;
}

.mt-1 {
	margin-top: 0.5rem;
}
.mt-2 {
	margin-top: 1rem;
}
.mt-3 {
	margin-top: 1.5rem;
}

.mb-1 {
	margin-bottom: 0.5rem;
}
.mb-2 {
	margin-bottom: 1rem;
}
.mb-3 {
	margin-bottom: 1.5rem;
}

/* Page Title */
.page-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	padding: 1rem 0;
}

/* Filter Section */
.filter-section {
	margin-bottom: 1.5rem;
}

/* Attendance Card */
.attendance-card {
	background-color: var(--bg-dark-secondary);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
	border: 1px solid var(--border-color);
}

.attendance-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border-color);
}

.service-name-text {
	font-weight: 600;
	font-size: 1rem;
}

.attendance-date {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.attendance-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.attendance-detail {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.detail-label {
	color: var(--text-secondary);
	font-size: 0.875rem;
}

.detail-value {
	font-weight: 600;
	font-size: 0.875rem;
}

/* Service Card */
.service-card {
	background-color: var(--bg-dark-secondary);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
	border: 1px solid var(--border-color);
}

.service-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border-color);
}

.service-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.service-description {
	color: var(--text-secondary);
	font-size: 0.875rem;
	line-height: 1.5;
	margin-bottom: 0.5rem;
}

.service-detail {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
}

.detail-icon {
	font-size: 1rem;
}

.detail-text {
	color: var(--text-secondary);
}

/* Status Badges */
.status-badge {
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.status-active {
	background-color: rgba(16, 185, 129, 0.2);
	color: var(--success-green);
}

.status-past {
	background-color: rgba(128, 128, 128, 0.2);
	color: var(--text-tertiary);
}

.status-future {
	background-color: rgba(253, 185, 19, 0.2);
	color: var(--primary-gold);
}
