/**
 * ALOS Customer Portal (v0.17.0) — frontend styles.
 * Orange (#E8590C) + black branding. Responsive, no theme overrides beyond
 * the .alos-portal scope.
 */

.alos-portal {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 4px 32px;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
}

/* Header */
.alos-portal-head {
    background: #111;
    border-left: 5px solid #E8590C;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 18px;
    color: #fff;
}
.alos-portal-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.alos-portal-brand img {
    border-radius: 8px;
    flex: 0 0 auto;
}
.alos-portal-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.alos-portal-customer {
    color: #E8590C;
    font-weight: 700;
}

/* Tabs */
.alos-portal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.alos-portal-tab {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
}
.alos-portal-tab:hover {
    border-color: #E8590C;
    color: #E8590C;
    text-decoration: none;
}
.alos-portal-tab-active {
    background: #E8590C;
    border-color: #E8590C;
    color: #fff;
}
.alos-portal-tab-active:hover {
    color: #fff;
}

/* Tables */
.alos-portal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}
.alos-portal-table th,
.alos-portal-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.alos-portal-table thead th {
    background: #111;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.alos-portal-table tbody tr:last-child td {
    border-bottom: none;
}
.alos-portal-table tbody tr:hover {
    background: #fff8f3;
}

/* Key/value table (POD detail) */
.alos-portal-kv {
    width: 100%;
    max-width: 640px;
    border-collapse: collapse;
    margin: 12px 0 20px;
}
.alos-portal-kv th,
.alos-portal-kv td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.alos-portal-kv th {
    width: 160px;
    color: #666;
    font-weight: 600;
}

/* Badges */
.alos-portal-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #eee;
    color: #333;
    white-space: nowrap;
}
.alos-portal-badge-green { background: #e6f4ea; color: #137333; }
.alos-portal-badge-orange { background: #fef3e2; color: #b06000; }
.alos-portal-badge-red { background: #fdecea; color: #b3261e; }

/* Buttons */
.alos-portal-btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.alos-portal-btn:hover {
    border-color: #E8590C;
    color: #E8590C;
    text-decoration: none;
}
.alos-portal-btn-primary {
    background: #E8590C;
    border-color: #E8590C;
    color: #fff;
}
.alos-portal-btn-primary:hover {
    background: #cf4e0a;
    color: #fff;
}

/* Misc */
.alos-portal-muted { color: #888; }
.alos-portal-empty {
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    color: #666;
}
.alos-portal-notice {
    background: #fff8f3;
    border: 1px solid #E8590C;
    border-left-width: 5px;
    border-radius: 6px;
    padding: 16px 18px;
    margin: 12px 0;
}
.alos-portal-login {
    max-width: 420px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.alos-portal-login h2 { margin-top: 0; }

/* POD photos */
.alos-portal-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin: 10px 0 20px;
}
.alos-portal-photos img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}
.alos-portal-signature {
    max-width: 320px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
}

/* Invoice print view: reuse admin invoice markup, scoped for frontend */
.alos-portal-invoice .alos-invoice {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
}
.alos-portal-invoice .alos-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 3px solid #E8590C;
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.alos-portal-invoice .alos-invoice-brand {
    display: flex;
    gap: 14px;
    align-items: center;
}
.alos-portal-invoice .alos-invoice-company {
    font-size: 22px;
    font-weight: 800;
}
.alos-portal-invoice table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.alos-portal-invoice th,
.alos-portal-invoice td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.alos-portal-invoice .alos-invoice-totals td {
    text-align: right;
}

/* Responsive */
@media (max-width: 720px) {
    .alos-portal-table thead { display: none; }
    .alos-portal-table,
    .alos-portal-table tbody,
    .alos-portal-table tr,
    .alos-portal-table td {
        display: block;
        width: 100%;
    }
    .alos-portal-table tr {
        border-bottom: 2px solid #eee;
        margin-bottom: 8px;
    }
    .alos-portal-table td { border-bottom: none; padding: 6px 12px; }
    .alos-portal-invoice .alos-invoice { padding: 18px; }
}

/* Print: invoice only */
@media print {
    .alos-portal-no-print,
    .alos-portal-tabs,
    .alos-portal-head {
        display: none !important;
    }
    .alos-portal-invoice .alos-invoice {
        border: none;
        padding: 0;
        max-width: none;
    }
    body { background: #fff; }
}
