/* Maritime Operations Hub - Drift AI Branding */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --navy: hsl(211, 63%, 24%);
    --teal: hsl(191, 91%, 36%);
    --cyan: hsl(189, 92%, 43%);
    --slate: hsl(215, 16%, 47%);
    --background: hsl(210, 25%, 98%);
    --foreground: hsl(215, 25%, 27%);
    --gradient-hero: linear-gradient(135deg, hsl(211, 63%, 24%), hsl(191, 91%, 36%));
    --gradient-accent: linear-gradient(90deg, hsl(191, 91%, 36%), hsl(189, 92%, 43%));
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-medium: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-large: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.navbar {
    background: var(--gradient-hero);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

.navbar-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.navbar-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.user-info {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 500;
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 70vh;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-block;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-large);
    width: 100%;
    max-width: 450px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 60px;
    width: auto;
}

.login-box h2 {
    margin-bottom: 0.5rem;
    color: var(--navy);
    text-align: center;
}

.login-subtitle {
    color: var(--slate);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    text-align: center;
}

.login-form {
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--foreground);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid hsl(214, 32%, 91%);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px hsla(189, 92%, 43%, 0.1);
}

.demo-credentials {
    background: linear-gradient(135deg, hsl(189, 92%, 96%), hsl(191, 91%, 96%));
    padding: 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    border-left: 4px solid var(--cyan);
}

.demo-credentials code {
    background-color: hsla(189, 92%, 43%, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-family: 'Courier New', monospace;
    color: var(--navy);
    font-weight: 600;
}

.dashboard {
    padding: 2rem 0;
}

.dashboard h1 {
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--slate);
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.map-container {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

#map {
    width: 100%;
    height: 500px;
}

.fleet-panel {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-medium);
}

.fleet-panel h2 {
    color: var(--navy);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.fleet-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, hsl(189, 92%, 96%), hsl(191, 91%, 96%));
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border-left: 4px solid var(--cyan);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--slate);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.vessel-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vessel-item {
    padding: 1rem;
    background-color: hsl(210, 40%, 98%);
    border-radius: 0.75rem;
    border-left: 3px solid var(--cyan);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.vessel-item:hover {
    background: linear-gradient(135deg, hsl(189, 92%, 96%), hsl(191, 91%, 96%));
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
}

.vessel-name {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.vessel-info {
    font-size: 0.85rem;
    color: var(--slate);
}

.fleet-management {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    margin: 20px 0;
}

.fleet-controls {
    margin-top: 15px;
}

.fleet-stats-row {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.fleet-stats-row .stat-card {
    flex: 1;
    min-width: 150px;
}

.route-optimization {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-medium);
}

.route-optimization h2 {
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: flex-end;
}

.result-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, hsl(189, 92%, 96%), hsl(191, 91%, 96%));
    border-radius: 0.75rem;
    border-left: 4px solid var(--cyan);
    box-shadow: var(--shadow-soft);
}

.result-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 1rem;
}

.result-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid hsla(189, 92%, 43%, 0.2);
}

.result-section:last-of-type {
    border-bottom: none;
}

.result-section h4 {
    color: var(--navy);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.result-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid hsla(189, 92%, 43%, 0.1);
}

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

.result-label {
    font-size: 0.85rem;
    color: var(--slate);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--teal);
}

.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: hsl(142, 71%, 95%);
    color: hsl(142, 71%, 25%);
    border-left: 4px solid hsl(142, 71%, 45%);
}

.alert-error {
    background-color: hsl(0, 84%, 95%);
    color: hsl(0, 84%, 30%);
    border-left: 4px solid hsl(0, 84%, 60%);
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--slate);
    border-top: 1px solid hsl(214, 32%, 91%);
    margin-top: 3rem;
    font-size: 0.9rem;
}

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

    .form-row {
        grid-template-columns: 1fr;
    }
}

.map-legend {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    font-family: 'Inter', sans-serif;
}

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-large);
    z-index: 1000;
    overflow: hidden;
}

@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        bottom: 10px;
        right: 10px;
    }
}

.chatbot-header {
    background: var(--gradient-hero);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    user-select: none;
    transition: var(--transition-smooth);
}

.chatbot-header:hover {
    background: linear-gradient(135deg, hsl(211, 63%, 20%), hsl(191, 91%, 32%));
}

.chatbot-body {
    background: white;
}

.chatbot-messages {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: hsl(210, 40%, 98%);
}

.chatbot-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.9rem;
}

.user-message {
    background: var(--gradient-accent);
    color: white;
    margin-left: auto;
    text-align: right;
    box-shadow: var(--shadow-soft);
}

.bot-message {
    background: white;
    border: 1px solid hsl(214, 32%, 91%);
    box-shadow: var(--shadow-soft);
}

.chatbot-input-container {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid hsl(214, 32%, 91%);
    background: white;
}

.chatbot-input-container input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid hsl(214, 32%, 91%);
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-smooth);
}

.chatbot-input-container input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px hsla(189, 92%, 43%, 0.1);
}

.btn-chat {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.btn-chat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin: 0;
}

.section-header .btn {
    margin: 0;
}

.demo-badge {
    background: linear-gradient(135deg, hsl(45, 93%, 85%), hsl(45, 93%, 90%));
    color: hsl(30, 70%, 25%);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid hsl(45, 93%, 65%);
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

.form-column .form-group {
    width: 100%;
}

.route-optimization {
    order: 1;
}

.fleet-management {
    order: 2;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header .btn {
        width: 100%;
    }
    
    .navbar-brand {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-logo {
        height: 30px;
    }
}
