/* ============================================================
   CityBlue Portal — Stylesheet
   Matches cityblue.com brand: Raleway, #1a56a0, #00aeef
   ============================================================ */

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

/* ------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Raleway', Helvetica, sans-serif;
    font-weight: 400;
    color: #333333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #1a56a0; text-decoration: none; }
a:hover { color: #00aeef; }
img { max-width: 100%; height: auto; }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
    background: #ffffff;
    border-bottom: 3px solid #00aeef;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 48px; width: auto; }

.header-contact {
    font-size: 13px;
    color: #666;
    text-align: right;
    line-height: 1.6;
}

.header-contact a { color: #1a56a0; font-weight: 600; }
.header-contact a:hover { color: #00aeef; }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.page-hero {
    background: linear-gradient(135deg, #1a56a0 0%, #0d3a73 100%);
    color: #ffffff;
    padding: 48px 24px;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #ffffff;
}

.page-hero h1 span { color: #00aeef; }

.page-hero p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto;
}

/* ------------------------------------------------------------
   Main
   ------------------------------------------------------------ */
.site-main {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
}

.site-main.narrow { max-width: 720px; }

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1a56a0;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #00aeef;
    border-radius: 2px;
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 6px;
}

.form-group label .required { color: #e53e3e; margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Raleway', Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: #1a56a0;
    box-shadow: 0 0 0 3px rgba(26,86,160,0.12);
}

.form-control::placeholder { color: #aaa; font-weight: 400; }
textarea.form-control { min-height: 120px; resize: vertical; }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a56a0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Radio group */
.radio-group { display: flex; gap: 16px; margin-bottom: 24px; }
.radio-option { flex: 1; position: relative; }
.radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
    transition: all 0.2s;
    text-align: center;
}

.radio-option input[type="radio"]:checked + label {
    border-color: #1a56a0;
    background: #f0f5ff;
    color: #1a56a0;
}

.radio-option label:hover { border-color: #00aeef; color: #00aeef; }
.radio-option .radio-icon { font-size: 20px; }

.radio-hint {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #999;
    margin-top: 4px;
    display: block;
    text-align: center;
}

/* ------------------------------------------------------------
   Drop Zone
   ------------------------------------------------------------ */
.drop-zone {
    border: 2px dashed #b0c4de;
    border-radius: 8px;
    padding: 20px 24px;
    text-align: center;
    background: #f8faff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #1a56a0;
    background: #eef4ff;
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.drop-zone-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.drop-zone-text { font-size: 15px; font-weight: 600; color: #1a56a0; margin-bottom: 4px; }
.drop-zone-sub { font-size: 13px; color: #888; }
.drop-zone-types { font-size: 11px; color: #aaa; margin-top: 8px; letter-spacing: 0.5px; }

/* File list */
.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}

.file-item-name {
    flex: 1;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item-size { color: #888; font-size: 12px; white-space: nowrap; }

.file-item-remove {
    color: #e53e3e;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0 4px;
}

.file-item-remove:hover { color: #c53030; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 6px;
    font-family: 'Raleway', Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: #1a56a0; color: #fff; border-color: #1a56a0; }
.btn-primary:hover { background: #0d3a73; border-color: #0d3a73; color: #fff; }

.btn-secondary { background: transparent; color: #1a56a0; border-color: #1a56a0; }
.btn-secondary:hover { background: #f0f5ff; }

.btn-accent { background: #00aeef; color: #fff; border-color: #00aeef; }
.btn-accent:hover { background: #0090c7; border-color: #0090c7; color: #fff; }

.btn-danger { background: #e53e3e; color: #fff; border-color: #e53e3e; }
.btn-danger:hover { background: #c53030; border-color: #c53030; color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 12px; letter-spacing: 1px; }
.btn-lg { padding: 18px 40px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------------------------------------
   Badges
   ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-new        { background: #fff3cd; color: #856404; }
.badge-quote      { background: #cff4fc; color: #0c5460; }
.badge-quoted     { background: #d1ecf1; color: #0c5460; }
.badge-approved   { background: #d4edda; color: #155724; }
.badge-production { background: #e2d9f3; color: #4a235a; }
.badge-proof      { background: #fde8d8; color: #7d3c01; }
.badge-changes    { background: #fce4e4; color: #7b1111; }
.badge-complete   { background: #d4edda; color: #155724; }
.badge-nested     { background: #e2e8f0; color: #64748b; }

/* ------------------------------------------------------------
   Chat
   ------------------------------------------------------------ */
.chat-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 480px;
    overflow-y: auto;
    padding: 4px 2px;
    margin-bottom: 20px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 80%;
}

.chat-message.staff   { align-self: flex-end; align-items: flex-end; }
.chat-message.customer { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message.staff .chat-bubble {
    background: #1a56a0;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.customer .chat-bubble {
    background: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-meta { font-size: 11px; color: #aaa; padding: 0 4px; }

.chat-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrap textarea { flex: 1; min-height: 80px; resize: none; }

/* ------------------------------------------------------------
   Info Grid
   ------------------------------------------------------------ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.info-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.info-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

.info-value { font-size: 15px; font-weight: 600; color: #333; min-width: 0; overflow: hidden; }
.info-value a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------
   Table
   ------------------------------------------------------------ */
.job-table { width: 100%; border-collapse: collapse; }

.job-table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    background: #fafafa;
    white-space: nowrap;
}

.job-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
}

.job-table tr:hover td { background: #f8faff; }
.job-table tr:last-child td { border-bottom: none; }
.job-table a { font-weight: 600; color: #1a56a0; }

/* ------------------------------------------------------------
   Filter Bar
   ------------------------------------------------------------ */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    align-items: center;
}

.filter-bar label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    margin-right: 4px;
}

.filter-btn, .view-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-family: 'Raleway', Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active,
.view-pill:hover,
.view-pill.active {
    border-color: #1a56a0;
    color: #1a56a0;
    background: #f0f5ff;
}
.view-pill {
    text-transform: none;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
}

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-info    { background: #e8f4fd; border-color: #1a56a0; color: #0c3a6e; }
.alert-success { background: #d4edda; border-color: #28a745; color: #155724; }
.alert-warning { background: #fff3cd; border-color: #ffc107; color: #856404; }
.alert-error   { background: #f8d7da; border-color: #e53e3e; color: #721c24; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    margin-top: auto;
}

.site-footer a { color: #00aeef; }
.site-footer a:hover { color: #fff; }

/* ------------------------------------------------------------
   Utility
   ------------------------------------------------------------ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.d-flex { display: flex; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.hidden { display: none; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .page-hero h1 { font-size: 1.6rem; letter-spacing: 2px; }
    .form-row { grid-template-columns: 1fr; }
    .radio-group { flex-direction: column; }
    .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
    .header-contact { text-align: left; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .chat-message { max-width: 92%; }
    .job-table { display: block; overflow-x: auto; }
    .card { padding: 20px; }
    .site-main { padding: 24px 16px; }
}

@media (max-width: 480px) {
    .info-grid { grid-template-columns: 1fr; }
    .btn-lg { padding: 14px 24px; font-size: 13px; }
}

/* Radio option hover/click animation */
.radio-option {
    transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
}
.radio-option:hover { transform: scale(1.04); }
.radio-option:active { transform: scale(1.09); transition: transform 0.08s ease; }

/* Site nav bar */
nav.site-nav {
    background: #1a56a0;
    border-top: 1px solid #1a3a5c;
}
nav.site-nav ul {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    list-style: none !important;
    gap: 0;
}
nav.site-nav ul li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
}
nav.site-nav ul li a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.15s;
}
nav.site-nav ul li a:hover {
    background: rgba(255,255,255,0.12);
}
nav.site-nav ul li a.nav-portal-active {
    color: #5ce0f0 !important;
}

/* Two-column form layout */
.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    align-items: start;
}
.form-col-left, .form-col-right {
    display: flex;
    flex-direction: column;
    gap: 0;
}
@media (max-width: 768px) {
    .form-two-col {
        grid-template-columns: 1fr;
    }
}

/* Fix two-col grid width */
.form-two-col {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}

/* Submit button in left col on wide, centered on mobile */
.submit-left {
    text-align: center;
    padding: 8px 0 16px;
}
@media (min-width: 769px) {
    .submit-left {
        text-align: right;
    }
    .submit-left .btn-primary {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .submit-left {
        text-align: center;
        padding: 24px 0;
    }
}
