﻿*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
}

/* ── Top bar ─────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  background: linear-gradient(to right, #a8c832 0%, #4a6e50 50%, #2a3d35 100%);
}

.top-bar__logo {
  height: 40px;
  max-height: 40px;
  width: auto;
  max-width: 160px;
  display: block;
}

.top-bar__user {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.top-bar__user a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-bar a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-bar__user svg {
  opacity: 0.9;
}

/* ── Main content ────────────────────────────────────────── */
.content {
  padding: 24px;
}

/* ── Vessel grid ─────────────────────────────────────────── */
.vessel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Loading / error ─────────────────────────────────────── */
.loading-msg {
  color: #aaaaaa;
  font-size: 0.9rem;
}

.error-msg {
  color: #ff6b6b;
}

/* ── Vessel card ─────────────────────────────────────────── */
.vessel-card {
  background-color: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  overflow: hidden;
}

.vessel-card--ok {
  border-color: #4a6e50;
}

.vessel-card--fail {
  border-color: #8b2020;
}

.vessel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(to right, #a8c832, #4a6e50);
}

.vessel-card--fail .vessel-card__header {
  background: linear-gradient(to right, #8b2020, #4a1010);
}

.vessel-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.vessel-card__pc-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
}

.vessel-card__body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vessel-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.vessel-card__label {
  color: #aaaaaa;
}

.vessel-card__value {
  font-weight: 600;
  color: #ffffff;
}

.vessel-card__pcnames {
  font-size: 0.75rem;
  color: #cccccc;
  text-align: right;
}

.vessel-card__since--ok {
  color: #a8c832;
}

.vessel-card__since--fail {
  color: #ff6b6b;
}

.vessel-card__status {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* App launcher grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 720px;
    margin: 0 auto;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.75rem 1rem;
    border-radius: 12px;
    background: var(--card-bg, #1e2a38);
    color: var(--card-color, #ffffff);
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.app-card:hover {
    transform: translateY(-3px);
    background: var(--card-hover-bg, #2a3a4e);
}

.app-card__icon {
    width: 48px;
    height: 48px;
}

.app-card__label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Vessel card — clickable link reset ──────────────────── */
a.vessel-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.vessel-card .vessel-card__name {
    text-decoration: none;
}

a.vessel-card:hover {
    border-color: #a8c832;
}

/* ── Order Files page ─────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.back-link {
    color: #a8c832;
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
}

.back-link:hover { text-decoration: underline; }

.page-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
}

.file-table thead tr {
    background: linear-gradient(to right, #a8c832, #4a6e50);
}

.file-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.file-table tbody tr {
    border-bottom: 1px solid #333333;
    transition: background 0.12s ease;
}

.file-table tbody tr:last-child {
    border-bottom: none;
}

.file-table tbody tr:hover {
    background-color: #333333;
}

.file-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
}

.file-table__name {
    color: #ffffff;
    font-weight: 500;
    word-break: break-all;
}

.file-table__size {
    color: #aaaaaa;
    white-space: nowrap;
    text-align: right;
    width: 90px;
}

.file-table__date {
    color: #a8c832;
    white-space: nowrap;
    text-align: right;
    width: 140px;
}