/* Dark Water Theme - Custom CSS */

:root {
    --primary: #0a2540;
    --secondary: #1e4975;
    --accent: #48b5e9;
    --text-light: #e0f7ff;
    --text-primary: #ffffff;
    --text-secondary: #b0c4de;
    --dark-bg: #051625;
    --sidebar-width: 280px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(to bottom, rgba(0, 10, 30, 0.9), rgba(0, 15, 40, 0.85)), 
                      url('../images/water-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.wrapper {
    flex: 1;
}

/* Navbar */
.navbar {
    background-color: var(--primary) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    background-image: linear-gradient(to right, var(--primary), var(--secondary));
}

.navbar-brand {
    font-weight: 600;
    color: var(--accent) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: var(--primary) !important;
    background-image: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent);
}

.sidebar .nav-link.active {
    color: var(--accent);
    border-left: 3px solid var(--accent);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar .nav-link .bi {
    margin-right: 10px;
}

.sidebar .sub-menu {
    padding-left: 20px;
}

.sidebar .dropdown-toggle::after {
    display: none;
}

.sidebar .dropdown-toggle {
    position: relative;
}

.sidebar .dropdown-toggle::before {
    content: "\F282";
    font-family: "bootstrap-icons";
    position: absolute;
    right: 15px;
    transition: transform 0.35s ease;
}

.sidebar .dropdown-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

/* Main content */
main {
    padding-top: 1.5rem;
    margin-left: auto;
    transition: all 0.3s;
}

/* Card styling */
.card {
    background-color: rgba(15, 40, 65, 0.7);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-header {
    background-color: rgba(30, 73, 117, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: var(--accent);
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: #3ba5d9;
    border-color: #3ba5d9;
}

/* Footer */
.footer {
    background-color: var(--primary) !important;
    color: var(--text-secondary);
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.2);
    background-image: linear-gradient(to right, var(--primary), var(--secondary));
    width: 100%;
    margin-left: 0;
    position: relative;
    z-index: 101; /* Higher than sidebar z-index */
}

/* Table styling */
.table {
    color: var(--text-light);
    background-color: rgba(15, 40, 65, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: rgba(30, 73, 117, 0.7);
    border-bottom: none;
    color: var(--accent);
}

/* Google Maps styling */
#map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

/* Info Window styling */
.gm-style .gm-style-iw {
    background-color: var(--primary);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gm-style .gm-style-iw-c {
    padding: 12px !important;
    background-color: var(--primary) !important;
    border-radius: 8px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    background-color: var(--primary) !important;
}

.gm-style .gm-style-iw-t::after {
    background: var(--primary) !important;
}

.info-window {
    color: var(--text-primary);
    max-width: 200px;
}

.info-window h6 {
    color: var(--accent);
    margin-bottom: 5px;
    font-weight: 600;
}

/* Responsive map adjustments */
@media (max-width: 767.98px) {
    #map {
        height: 300px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    #map {
        height: 350px;
    }
}

@media (min-width: 992px) {
    #map {
        height: 400px;
    }
}

/* For mobile devices */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        width: 100%;
        height: calc(100vh - 56px);
        z-index: 99;
    }
    
    main {
        margin-left: 0;
    }
}

/* Login page styles */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
}

.login-box {
    width: 360px;
    margin: 0 auto;
}

.login-logo {
    margin-bottom: 25px;
    text-align: center;
}

.login-logo .brand-image {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.login-card-body {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.login-box-msg {
    margin: 0;
    padding: 0 0 20px;
    text-align: center;
    font-size: 1rem;
}

.input-group-text {
    background-color: transparent;
}

.verification-code {
    letter-spacing: 5px;
    font-size: 1.2rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Language Switcher Styles */
.language-switcher-top {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9999;
    background: rgba(10, 37, 64, 0.95);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
}

.lang-option:hover {
    color: var(--accent);
    background: rgba(72, 181, 233, 0.15);
    border-color: rgba(72, 181, 233, 0.3);
    text-decoration: none;
    transform: translateY(-1px);
}

.lang-option.active {
    color: var(--text-primary);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(72, 181, 233, 0.4);
}

.lang-option .lang-name {
    font-size: 13px;
    white-space: nowrap;
}

/* Responsive language switcher */
@media (max-width: 768px) {
    .language-switcher-top {
        top: 10px;
        right: 10px;
        padding: 6px;
    }
    
    .lang-option {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .lang-option .lang-name {
        display: none;
    }
}

/* Login page language switcher */
.login-page .language-switcher-top {
    background: rgba(0, 0, 0, 0.7);
}

.login-page .lang-option {
    background: rgba(255, 255, 255, 0.1);
}

.login-page .lang-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login-page .lang-option.active {
    background: var(--accent);
    color: white;
}
