body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f8fafd;
    color: #202124;
}

header {
    height: 64px;
    background: white;
    box-shadow: 0 1px 4px rgba(60,64,67,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 42px;
}

header a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.brand {
    font-size: 22px;
    font-weight: 600;
    color: #1a73e8;
}

.container {
    max-width: 900px;
    margin: 50px auto;
    background: white;
    padding: 38px;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(60,64,67,0.12);
}

.subtitle {
    color: #5f6368;
    margin-bottom: 30px;
}

.login-card {
    width: 390px;
    margin: 130px auto;
    background: white;
    padding: 36px;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(60,64,67,0.14);
}

.logo {
    font-size: 28px;
    color: #1a73e8;
    font-weight: 600;
    margin-bottom: 18px;
}

label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #dadce0;
    border-radius: 9px;
    font-size: 15px;
}

button {
    margin-top: 28px;
    background: #1a73e8;
    color: white;
    padding: 13px 22px;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    cursor: pointer;
}

button:hover {
    background: #1558b0;
}

.error {
    color: #d93025;
    margin-top: 12px;
}

.summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 30px;
}

.card {
    background: #f1f3f4;
    padding: 22px;
    border-radius: 16px;
    text-align: center;
}

.card h2 {
    margin: 0;
    color: #1a73e8;
}

.card p {
    margin-bottom: 0;
    color: #5f6368;
}

.download-btn {
    display: inline-block;
    margin-top: 34px;
    background: #188038;
    color: white;
    padding: 14px 22px;
    border-radius: 9px;
    text-decoration: none;
}

.download-btn:hover {
    background: #137333;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.company-logo {
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
    margin-bottom: 12px;
}

.logo-text {
    font-size: 28px;
    font-weight: 600;
    color: #1a73e8;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.help-box {
    background: #f1f3f4;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 28px;
    color: #3c4043;
}

.help-box summary {
    cursor: pointer;
    font-weight: 600;
    color: #1a73e8;
}

.drop-zone {
    border: 2px dashed #dadce0;
    border-radius: 18px;
    background: #f8fafd;
    padding: 36px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #1a73e8;
    background: #eef4ff;
}

.drop-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.drop-title {
    font-size: 17px;
    font-weight: 600;
}

.drop-subtitle {
    margin-top: 6px;
    color: #5f6368;
    font-size: 14px;
}

.file-name {
    margin-top: 12px;
    color: #188038;
    font-weight: 600;
}

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 253, 0.88);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-card {
    background: white;
    padding: 36px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(60,64,67,0.18);
    width: 360px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #dadce0;
    border-top: 5px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    text-align: center;
    color: #5f6368;
    font-size: 13px;
    padding: 26px;
}

.locked-field-wrapper {
    position: relative;
}

.locked-field {
    background: #f1f3f4;
    color: #5f6368;
    cursor: not-allowed;
}

.lock-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 16px;
}

.locode-note {
    margin-top: 8px;
    color: #d93025;
    font-size: 13px;
}

.subscription-card {

    margin-top: 25px;
    margin-bottom: 25px;

    border: 1px solid #dadce0;
    border-radius: 16px;

    overflow: hidden;

    background: white;
}

.subscription-header {

    background: #1a73e8;

    color: white;

    padding: 14px 18px;

    font-size: 15px;
    font-weight: 600;
}

.subscription-content {
    padding: 20px;
}

.coverage-country {

    font-size: 22px;
    font-weight: 600;

    margin-bottom: 10px;
}

.coverage-locode {

    color: #5f6368;

    font-size: 15px;

    margin-bottom: 8px;
}

.coverage-plan {

    display: inline-block;

    background: #e6f4ea;

    color: #137333;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;
}

.kpi-row {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;

    margin-bottom: 25px;
}

.kpi-card {

    background: white;

    border: 1px solid #dadce0;

    border-radius: 14px;

    padding: 20px;

    text-align: center;
}

.kpi-number {

    font-size: 22px;
    font-weight: 600;

    color: #1a73e8;
}

.kpi-label {

    color: #5f6368;

    margin-top: 6px;

    font-size: 13px;
}

.info-banner {
    background: #e8f0fe;
    color: #174ea6;
    border-left: 4px solid #1a73e8;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.coverage-pill {

    display: inline-block;

    margin-top: 15px;
    margin-bottom: 30px;

    background: #e6f4ea;

    color: #137333;

    padding: 8px 14px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;
}

.hero-title {

    font-size: 34px;

    font-weight: 600;

    color: #1a73e8;

    letter-spacing: -0.5px;

    margin-bottom: 8px;
}

.page-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    border-bottom: 1px solid #dadce0;
}

.tab-button {
    background: transparent;
    color: #5f6368;
    border: none;
    padding: 12px 16px;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
}

.tab-button.active {
    color: #1a73e8;
    border-bottom: 3px solid #1a73e8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.feature-card {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 18px;
    padding: 28px;
}

select {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #dadce0;
    border-radius: 9px;
    font-size: 15px;
    background: white;
}

.search-note {
    background: #fff7e6;
    color: #8a5a00;
    border-left: 4px solid #fbbc04;
    padding: 13px 16px;
    border-radius: 10px;
    margin-top: 18px;
    font-size: 14px;
}

nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

nav a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

select {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #dadce0;
    border-radius: 9px;
    font-size: 15px;
    background: white;
}

.search-note {
    background: #fff7e6;
    color: #8a5a00;
    border-left: 4px solid #fbbc04;
    padding: 13px 16px;
    border-radius: 10px;
    margin-top: 18px;
    font-size: 14px;
}

.result-box {
    margin-top: 28px;
    background: #f8fafd;
    border: 1px solid #dadce0;
    border-radius: 14px;
    padding: 20px;
}

.result-box pre {
    white-space: pre-wrap;
    font-family: Consolas, monospace;
}

.vessel-card {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
}

.vessel-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a73e8;
    margin-bottom: 20px;
}

.vessel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.vessel-grid div {
    background: #f8fafd;
    border-radius: 12px;
    padding: 14px;
}

.vessel-grid strong {
    display: block;
    color: #5f6368;
    font-size: 12px;
    margin-bottom: 6px;
}

.vessel-grid span {
    color: #202124;
    font-size: 15px;
    font-weight: 600;
}

.owner-section {
    margin-top: 26px;
}

.owner-section h3 {
    color: #202124;
    margin-bottom: 14px;
}

.result-summary {
    margin-top: 28px;
    border: 1px solid #dadce0;
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f3f4;
}

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

.result-row span {
    color: #5f6368;
}

.result-row strong {
    color: #202124;
}

.download-section {
    display: flex;
    gap: 14px;
    margin-top: 30px;
}

.secondary-btn {
    display: inline-block;
    background: #f1f3f4;
    color: #1a73e8;
    padding: 14px 22px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 600;
}

.secondary-btn:hover {
    background: #e8f0fe;
}

.back-link {

    margin-top: 24px;
}

.back-link a {

    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {

    text-decoration: underline;
}

.warning-banner {

    margin-top: 20px;
    margin-bottom: 30px;

    background: #fff7e6;

    color: #8a5a00;

    border-left: 5px solid #fbbc04;

    padding: 16px 20px;

    border-radius: 12px;

    font-size: 15px;
}

.analysis-section,
.distribution-section {
    margin-top: 34px;
}

.analysis-section h2,
.distribution-section h2 {
    color: #202124;
    margin-bottom: 16px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.analysis-card {
    background: #f8fafd;
    border: 1px solid #dadce0;
    border-radius: 14px;
    padding: 18px;
}

.analysis-card span {
    display: block;
    color: #5f6368;
    font-size: 14px;
    margin-bottom: 8px;
}

.analysis-card strong {
    color: #1a73e8;
    font-size: 24px;
}

.distribution-row {
    display: grid;
    grid-template-columns: 120px 1fr 50px;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.distribution-label {
    color: #3c4043;
    font-weight: 600;
}

.distribution-bar-wrapper {
    height: 18px;
    background: #f1f3f4;
    border-radius: 999px;
    overflow: hidden;
}

.distribution-bar {
    height: 100%;
    background: #1a73e8;
    border-radius: 999px;
}

.distribution-count {
    text-align: right;
    font-weight: 700;
    color: #202124;
}

.logo-link {
    display: inline-block;
    cursor: pointer;
}

.logo-link img {
    display: block;
}

.admin-page {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.admin-header h1 {
    margin: 0;
}

.admin-header p {
    margin-top: 6px;
    color: #666;
}

.admin-logout {
    text-decoration: none;
    background: #222;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.admin-stat-label {
    color: #666;
    font-size: 14px;
}

.admin-stat-value {
    font-size: 34px;
    font-weight: 700;
    margin-top: 8px;
}

.admin-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.admin-section h2 {
    margin-top: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e8e8e8;
    text-align: left;
    font-size: 14px;
}

.admin-table th {
    color: #555;
    font-weight: 700;
}

.admin-table td:last-child {
    white-space: nowrap;
}

.empty-row {
    text-align: center;
    color: #777;
    padding: 24px !important;
}


.secondary-button {
    background: white;
    color: #333;
    border: 1px solid #d0d0d0;
}

.secondary-button:hover {
    background: #f5f5f5;
}

.signup-section {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.signup-link {
    color: #2b6fe3;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.signup-link:hover {
    text-decoration: underline;
}

.success {
    color: #198754;
    margin: 12px 0;
    font-size: 14px;
    text-align: center;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.admin-table-wrapper {
    max-height: 450px;
    overflow-y: auto;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.inline-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.inline-form button {
    margin-top: 0;
}

.inline-form input {
    max-width: 360px;
}


.activity-card {
    margin-top: 34px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 18px;
    padding: 28px;
}

.activity-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.activity-grid h3 {
    margin-top: 0;
    font-size: 17px;
    color: #202124;
}

.activity-item {
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: #f8fafd;
}

.activity-item strong {
    display: block;
    color: #1a73e8;
    margin-bottom: 6px;
}

.activity-item span {
    display: block;
    color: #3c4043;
    font-size: 14px;
}

.activity-item small {
    display: block;
    color: #5f6368;
    margin-top: 6px;
}

.activity-empty {
    background: #f8fafd;
    color: #5f6368;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed #dadce0;
}

.inline-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.inline-form button {
    margin-top: 0;
}

.danger-button {
    background: #dc3545;
    color: white;
}

.danger-button:hover {
    background: #bb2d3b;
}

.enable-button {
    background: #188038;
    color: white;
}

.enable-button:hover {
    background: #137333;
}

.danger-button,
.enable-button {
    width: 120px;
    margin-top: 0;
    padding: 10px 18px;
    white-space: nowrap;
    border-radius: 8px;
    font-weight: 600;
}

.analytics-section {
    margin-top: 32px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.chart-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.chart-card-wide {
    grid-column: 1 / -1;
}

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