/* Bridge Bootstrap component colors onto the shared theme.css palette */
:root {
	--border-color: var(--border-steel);
	--text-main: var(--text-light);
	--text-muted: var(--text-dim);
	--primary-blue: var(--accent-green);
	--primary-hover: var(--accent-glow);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 60%, rgba(52, 211, 153, 0.05) 0%, transparent 40%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* PAGE LOADER */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
#page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.spinner {
    width: 52px;
    height: 52px;
    border: 3.5px solid var(--border-steel);
    border-top-color: var(--accent-glow);
    border-right-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 0.85s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    box-shadow: var(--glow-effect);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loader-text {
    color: var(--steel-silver);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite alternate;
}
@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; color: var(--accent-glow); }
}
#page-content {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    flex: 1;
    display: flex;
    flex-direction: column;
}
#page-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Visibility Controls */
.desktop-only {
    display: block;
}
.mobile-only {
    display: none;
}
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }
}

/* Header / Navbar */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 18, 16, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-steel);
    padding: 0.85rem 5%;
}
.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    background: #fff;
    padding: 4px 10px;
    border-radius: 8px;
}
.logo-icon {
    height: 32px;
    width: auto;
}

/* Desktop Nav Links */
.nav-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
}
.nav-links li {
    position: relative;
}
.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.nav-links > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.1rem;
}
.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-glow);
    transition: width 0.3s ease;
}
.nav-links a:hover {
    color: var(--accent-glow);
}
.nav-links > li > a:hover::after {
    width: 100%;
}
.external-icon {
    font-size: 0.65rem;
    opacity: 0.65;
}
.dropdown-caret {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}
.nav-links li.has-dropdown:hover .dropdown-caret {
    transform: rotate(180deg);
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: var(--bg-card);
    border: 1px solid var(--border-steel);
    border-radius: 10px;
    box-shadow: var(--shadow-steel);
    list-style: none;
    min-width: 195px;
    padding: 0.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1001;
}
.nav-links li.has-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li a {
    display: block;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.nav-dropdown-menu li a::after {
    display: none;
}
.nav-dropdown-menu li a:hover {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-glow);
}

/* Mobile submenu (Features) */
.mobile-dropdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-submenu {
    list-style: none;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
}
.mobile-submenu li a {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Mobile Hamburger & Drawer Menu */
.mobile-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.35rem;
    cursor: pointer;
    padding: 0.4rem;
    display: none;
}
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    background: rgba(10, 18, 16, 0.98);
    border-bottom: 1px solid var(--border-steel);
    padding: 1.25rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    z-index: 999;
    backdrop-filter: blur(10px);
}
.mobile-nav-drawer.active {
    display: block;
}
.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.mobile-nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-nav-links a:hover {
    color: var(--accent-glow);
}
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
}

.login-btn {
    background: transparent;
    color: var(--accent-glow);
    padding: 0.55rem 1.25rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--accent-glow);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.login-btn:hover {
    background: rgba(52, 211, 153, 0.15);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: var(--glow-effect);
    transform: translateY(-2px);
}

footer {
    background: #060b09;
    border-top: 1px solid var(--border-steel);
    padding: 2.5rem 5% 2rem;
    text-align: center;
    color: var(--steel-silver);
    font-size: 0.85rem;
    margin-top: auto;
}
.footer-logo {
    height: 30px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    background: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Main Content Wrapper */
.main-wrapper {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

/* Registration Card Container */
.registration-card {
	background-color: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
	width: 100%;
	max-width: 550px;
	overflow: hidden;
}

/* Form Card Header Logo & Text */
.card-header-custom {
	background-color: rgba(18, 30, 26, 0.8);
	border-bottom: 1px solid var(--border-color);
	padding: 1.5rem 1rem;
	text-align: center;
}

.card-header-custom h5 {
	color: var(--text-main);
	font-weight: 600;
	font-size: 1.2rem;
	margin: 0;
}

.card-header-custom p {
	color: var(--text-muted);
	font-size: 0.875rem;
	margin-top: 0.25rem;
	margin-bottom: 0;
}

/* Form Controls */
.form-container {
	padding: 1.5rem;
}

.input-group-prepend .input-group-text {
	background-color: var(--steel-dark);
	border: 1px solid var(--border-color);
	color: var(--text-muted);
	font-weight: 500;
	font-size: 0.85rem;
	width: 130px;
}

.form-control {
	background-color: var(--bg-dark) !important;
	border: 1px solid var(--border-color) !important;
	color: var(--text-main) !important;
	font-size: 0.9rem;
	height: calc(2.25rem + 6px);
}

.form-control:focus {
	border-color: var(--primary-blue) !important;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.form-control::placeholder {
	color: #4b5563;
}

.btn-app {
	background-color: var(--primary-blue) !important;
	border: none !important;
	color: #ffffff !important;
	font-weight: 600;
	padding: 0.75rem;
	border-radius: 6px;
	font-size: 0.95rem;
	transition: background-color 0.2s ease;
}

.btn-app:hover:not(:disabled) {
	background-color: var(--primary-hover) !important;
}

.btn-app:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

#error_panel {
	display: none;
	background-color: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.3);
	color: #f87171;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.85rem;
	margin-bottom: 1rem;
}

/* Post Registration Panel Styles */
#post_reg_panel {
	display: none;
}

.info-display-box {
	background-color: var(--bg-dark);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.25rem;
}

.info-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border-color);
}

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

.info-label {
	color: var(--text-muted);
	font-size: 0.85rem;
	font-weight: 500;
}

.info-value {
	color: var(--text-main);
	font-size: 0.9rem;
	font-weight: 600;
	text-align: right;
	word-break: break-all;
}

#processing_loader {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	color: #ffffff;
}

/* Mobile Responsiveness Styles */
@media (max-width: 575.98px) {
	.main-wrapper {
		padding: 1rem 0.5rem;
	}

	.form-container {
		padding: 1rem;
	}

	.input-group {
		flex-direction: column;
		align-items: stretch;
	}

	.input-group-prepend {
		width: 100%;
		margin-right: 0;
		margin-bottom: 0.25rem;
	}

	.input-group-prepend .input-group-text {
		width: 100%;
		border: none;
		background-color: transparent;
		padding-left: 0;
		font-weight: 600;
		color: var(--text-main);
	}

	.input-group > .form-control {
		border-radius: 6px !important;
		width: 100%;
	}
}
