/* Technopolis Color Palette */
:root {
    --technopolis-navy: #1e3a5f;
    --technopolis-red: #d32f2f;
    --technopolis-light-blue: #5b9bd5;
    --technopolis-dark: #0f1f35;
    --technopolis-light: #f5f7fa;
}

/* Logo Styling */
.logo-img {
    height: 60px;
    width: auto;
    margin-right: 15px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Navbar toggler for mobile - dark icon */
.navbar-light .navbar-toggler {
    border-color: var(--technopolis-navy);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(30, 58, 95, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar - White Background with Navy Text */
.navbar.bg-primary,
.navbar.bg-dark {
    background-color: white !important;
    border-bottom: 3px solid var(--technopolis-red);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar.bg-primary .navbar-brand,
.navbar.bg-dark .navbar-brand {
    color: var(--technopolis-navy) !important;
}

.navbar.bg-primary .nav-link,
.navbar.bg-dark .nav-link {
    color: var(--technopolis-navy) !important;
}

.navbar.bg-primary .nav-link:hover,
.navbar.bg-dark .nav-link:hover {
    color: var(--technopolis-red) !important;
}

.navbar.bg-primary .navbar-text,
.navbar.bg-dark .navbar-text {
    color: var(--technopolis-navy) !important;
}

.navbar.bg-primary .dropdown-toggle,
.navbar.bg-dark .dropdown-toggle {
    color: var(--technopolis-navy) !important;
}

/* Buttons - Primary (Navy) */
.btn-primary {
    background-color: var(--technopolis-navy);
    border-color: var(--technopolis-navy);
}

.btn-primary:hover {
    background-color: var(--technopolis-dark);
    border-color: var(--technopolis-dark);
}

.btn-primary:focus,
.btn-primary:active {
    background-color: var(--technopolis-dark) !important;
    border-color: var(--technopolis-dark) !important;
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 95, 0.5) !important;
}

/* Buttons - Outline Primary */
.btn-outline-primary {
    color: var(--technopolis-navy);
    border-color: var(--technopolis-navy);
}

.btn-outline-primary:hover {
    background-color: var(--technopolis-navy);
    border-color: var(--technopolis-navy);
}

/* Buttons - Danger (Red accent) */
.btn-danger {
    background-color: var(--technopolis-red);
    border-color: var(--technopolis-red);
}

.btn-danger:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
}

/* Card Headers - Navy Blue */
.card-header.bg-primary,
.card-header.bg-dark {
    background-color: var(--technopolis-navy) !important;
    color: white;
}

/* Card Headers - Red accent for special sections */
.card-header.bg-danger {
    background-color: var(--technopolis-red) !important;
}

/* Badges - Primary */
.badge.bg-primary {
    background-color: var(--technopolis-navy) !important;
}

/* Badges - Info (Light Blue) */
.badge.bg-info {
    background-color: var(--technopolis-light-blue) !important;
}

/* Links */
a {
    color: var(--technopolis-navy);
}

a:hover {
    color: var(--technopolis-dark);
}

/* Dropdown Menu Items */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--technopolis-light);
    color: var(--technopolis-navy);
}

/* Active Navigation Items */
.nav-link.active {
    color: var(--technopolis-red) !important;
}

/* Form Focus States */
.form-control:focus,
.form-select:focus {
    border-color: var(--technopolis-navy);
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 95, 0.25);
}

/* Pagination Active */
.page-item.active .page-link {
    background-color: var(--technopolis-navy);
    border-color: var(--technopolis-navy);
}

.page-link {
    color: var(--technopolis-navy);
}

.page-link:hover {
    color: var(--technopolis-dark);
}

/* Alert Info - Light Blue */
.alert-info {
    background-color: rgba(91, 155, 213, 0.15);
    border-color: var(--technopolis-light-blue);
    color: var(--technopolis-dark);
}

/* Tables - Header styling */
.table thead th {
    background-color: var(--technopolis-light);
    color: var(--technopolis-navy);
    font-weight: 600;
}

/* Stat Cards Hover Effect */
.stat-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--technopolis-navy);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.2);
}

/* Custom Footer */
.footer {
    background-color: var(--technopolis-light);
    border-top: 4px solid var(--technopolis-red);
}

.footer h6 {
    letter-spacing: 0.5px;
}

.footer a {
    color: var(--technopolis-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--technopolis-red);
}

.footer .bi {
    margin-right: 8px;
}

/* Login Page Styling */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--technopolis-navy);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(135deg, var(--technopolis-navy) 0%, var(--technopolis-dark) 100%);
    background-size: 26px 26px, cover;
}

.login-container::before,
.login-container::after {
    content: '';
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    animation: login-blob-float 8s ease-in-out infinite;
}

.login-container::before {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -120px;
    background: var(--technopolis-red);
}

.login-container::after {
    width: 480px;
    height: 480px;
    bottom: -160px;
    right: -140px;
    background: var(--technopolis-light-blue);
    animation-name: login-blob-float-reverse;
    animation-delay: -4s;
}

@keyframes login-blob-float {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(90px, 60px) scale(1.15); }
    50%  { transform: translate(40px, 120px) scale(0.9); }
    75%  { transform: translate(-60px, 50px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes login-blob-float-reverse {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(-90px, -60px) scale(1.15); }
    50%  { transform: translate(-40px, -120px) scale(0.9); }
    75%  { transform: translate(60px, -50px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

.login-container .container {
    position: relative;
    z-index: 1;
}

.ship-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    cursor: pointer;
    transition: transform 5s ease-in-out;
    will-change: transform;
    perspective: 400px;
}

.ship-thrust {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 13px;
    transform: translate(-65%, 30%) rotate(0deg);
    transform-origin: center;
    filter: blur(0.5px);
    z-index: -1;
    animation: thrust-flicker 0.3s ease-in-out infinite alternate;
}

@keyframes thrust-flicker {
    0%   { opacity: 0.5; transform: translate(-65%, 25%) scale(0.75); }
    100% { opacity: 1; transform: translate(-65%, 45%) scale(1.15); }
}

.floating-ship {
    position: relative;
    display: inline-block;
    font-size: 28px;
    line-height: 1;
    user-select: none;
    transform-style: preserve-3d;
    animation: ship-float 6s ease-in-out infinite, ship-color-shift 5s linear infinite;
}

@keyframes ship-float {
    0%   { transform: translate(0, 0) rotateY(0deg) rotateZ(-8deg); }
    25%  { transform: translate(12px, -18px) rotateY(130deg) rotateZ(10deg); }
    50%  { transform: translate(-6px, -30px) rotateY(230deg) rotateZ(-14deg); }
    75%  { transform: translate(-16px, -10px) rotateY(300deg) rotateZ(6deg); }
    100% { transform: translate(0, 0) rotateY(360deg) rotateZ(-8deg); }
}

@keyframes ship-color-shift {
    0%   { filter: hue-rotate(0deg) saturate(1.6) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); }
    100% { filter: hue-rotate(360deg) saturate(1.6) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); }
}

.login-card {
    border-top: 4px solid var(--technopolis-red);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35) !important;
}

@media (prefers-reduced-motion: reduce) {
    .login-container::before,
    .login-container::after,
    .floating-ship,
    .ship-thrust {
        animation: none;
    }
    .ship-wrapper {
        transition: none;
    }
}

.login-logo {
    max-width: 250px;
    margin: 0 auto 30px;
    display: block;
}

/* Success Message Accent */
.alert-success {
    border-left: 4px solid var(--technopolis-light-blue);
}

/* Verification Section */
#emailVerificationSection {
    background-color: var(--technopolis-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--technopolis-navy);
}

/* Priority Badges Custom Colors */
.badge.bg-danger {
    background-color: var(--technopolis-red) !important;
}

/* Public Form Header */
.public-header {
    background-color: white !important;
    padding: 25px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-bottom: 4px solid var(--technopolis-red);
}

.public-header .navbar-brand {
    color: var(--technopolis-navy) !important;
    gap: 15px;
}

.public-header a {
    transition: color 0.3s ease;
}

.public-header a:hover {
    color: var(--technopolis-red) !important;
}

/* Icon colors */
.bi.text-primary {
    color: var(--technopolis-navy) !important;
}

/* Custom shadow for cards */
.card.shadow {
    box-shadow: 0 2px 15px rgba(30, 58, 95, 0.1) !important;
}

/* Light Blue Background for Public Form Pages */
body {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 100vh;
}

/* Make sure main content has proper spacing */
main.container {
    position: relative;
    z-index: 1;
}

/* Enhance card appearance on light blue background */
.card.shadow {
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.15) !important;
    border: none;
}

/* Responsive Logo */
@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}
