/* ===== Consolidated from inline <style> block #1 ===== */
:root {
            --fos-bg: #f7f7f7;
            --fos-dark: #1c1c1f;
            --fos-accent: #c7a15a;
            --fos-border: #e0e0e0;
            --fos-muted: #6b6f76;
              --fos-error: #c0392b;
            --fos-success: #2e7d32;
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: var(--fos-bg);
            color: #222;
        }
        header {
            background: var(--fos-dark);
            color: #fff;
            padding: 18px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        }
        .brand {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .brand-logo-img { height: 42px; width: auto; display: block; }


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

        .brand-logo {
            width: 40px;
            height: 40px;
            border-radius: 999px;
            background: radial-gradient(circle at 30% 20%, #ffffff, #999);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 18px;
            letter-spacing: 1px;
        }
        
        .brand-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .brand-text span:first-child {
            font-weight: 600;
            letter-spacing: 0.1em;
            font-size: 12px;
            text-transform: uppercase;
        }

        .brand-text span:last-child {
            font-weight: 400;
            font-size: 11px;
            opacity: 0.8;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        
        
        .header-actions {
            font-size: 12px;
            color: rgba(255,255,255,0.75);
            display: flex;
            gap: 14px;
            align-items: center;
        }
        .header-actions a { color: #fff; text-decoration: none; opacity: 0.9; }
        .header-actions a:hover { opacity: 1; text-decoration: underline; }

        .container {
            max-width: 95%;
            margin: 22px auto;
            padding: 0 18px 34px;
        }

        .card {
            background: #fff;
            border: 1px solid var(--fos-border);
            border-radius: 10px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.06);
            overflow: hidden;
        }

        .card-header {
            padding: 18px 18px 12px;
            border-bottom: 1px solid var(--fos-border);
        }
        .card-title {
            font-size: 18px;
            font-weight: 600;
            margin: 0 0 8px;
        }
        .card-subtitle {
            font-size: 13px;
            color: var(--fos-muted);
        }

        .filters {
            padding: 14px 18px;
            border-bottom: 1px solid var(--fos-border);
            display: grid;
            grid-template-columns: 1.5fr 1fr 1fr auto;
            gap: 12px;
            align-items: end;
        }
        .filters label { display:block; font-size: 12px; color: var(--fos-muted); margin-bottom: 6px; }
        .filters input, .filters select {
            width: 100%;
            padding: 10px 10px;
            border: 1px solid var(--fos-border);
            border-radius: 8px;
            font-size: 14px;
        }
        .filters button {
            padding: 10px 14px;
            border: none;
            border-radius: 8px;
            background: var(--fos-dark);
            color: #fff;
            font-weight: 600;
            cursor: pointer;
        }
        .filters button:hover { opacity: 0.95; }
        .filters .hint { grid-column: 1 / -1; font-size: 12px; color: var(--fos-muted); }

        .table-wrap { overflow-x: auto; }
        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        th, td {
            padding: 11px 12px;
            border-bottom: 1px solid var(--fos-border);
            text-align: left;
            vertical-align: top;
            white-space: nowrap;
        }
        th {
            font-size: 12px;
            color: var(--fos-muted);
            font-weight: 600;
            background: #fafafa;
        }
        td .muted { color: var(--fos-muted); }
        td a { color: #0b5bd3; text-decoration: none; }
        td a:hover { text-decoration: underline; }

        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 600;
            border: 1px solid var(--fos-border);
            background: #fff;
        }

        .footer {
            display:flex;
            align-items:center;
            justify-content: space-between;
            padding: 12px 18px;
            color: var(--fos-muted);
            font-size: 12px;
        }
        .pager a {
            display:inline-block;
            padding: 6px 10px;
            border: 1px solid var(--fos-border);
            border-radius: 8px;
            margin-left: 6px;
            color: #222;
            text-decoration:none;
            background: #fff;
        }
        .pager a:hover { background: #fafafa; }
        .pager .disabled { opacity: 0.5; pointer-events:none; }

        .alert {
            margin: 14px 18px 0;
            padding: 12px 14px;
            border: 1px solid #f2c1bd;
            background: #fff3f2;
            border-radius: 10px;
            color: #7a1610;
            font-size: 13px;
        }

        @media (max-width: 900px) {
            .filters { grid-template-columns: 1fr; }
        }
        
        
           .header-tagline {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            color: rgba(255,255,255,0.7);
        }

/* ===== Consolidated from inline <style> block #2 ===== */


      

        .layout {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        header {
            background: var(--fos-dark);
            color: #fff;
            padding: 18px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        }

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

        .brand-logo {
            width: 40px;
            height: 40px;
            border-radius: 999px;
            background: radial-gradient(circle at 30% 20%, #ffffff, #999);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 18px;
            letter-spacing: 1px;
        }

        .brand-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .brand-text span:first-child {
            font-weight: 600;
            letter-spacing: 0.1em;
            font-size: 12px;
            text-transform: uppercase;
        }

        .brand-text span:last-child {
            font-weight: 400;
            font-size: 11px;
            opacity: 0.8;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .header-tagline {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            color: rgba(255,255,255,0.7);
        }

        main {
            flex: 1;
            display: flex;
            justify-content: center;
            padding: 32px 16px 40px;
        }

        .card {
            background: #fff;
            max-width: 100%;
            width: 100%;
            border-radius: 14px;
            box-shadow: 0 18px 40px rgba(0,0,0,0.08);
            padding: 28px 24px 24px;
        }

        @media (min-width: 900px) {
            .card {
                padding: 32px 36px 30px;
            }
        }

        .card-header {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 20px;
        }

        .card-title {
            font-size: 22px;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--fos-dark);
        }

        .card-subtitle {
            font-size: 13px;
            color: #555;
            max-width: 640px;
        }

        .accent-bar {
            width: 90px;
            height: 3px;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--fos-accent), #f5d89f);
            margin-top: 6px;
        }

        .alert {
            padding: 12px 14px;
            border-radius: 10px;
            margin-bottom: 18px;
            font-size: 13px;
            line-height: 1.5;
         
            align-items: flex-start;
            gap: 8px;
        }

        .alert-success {
            background: #e9f5ec;
            color: var(--fos-success);
            border: 1px solid #c6e4cc;
        }

        .alert-error {
            background: #fdecea;
            color: var(--fos-error);
            border: 1px solid #f5c6c0;
        }

       .alert strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

        form {
            display: grid;
            grid-template-columns: 1fr;
            gap: 18px;
        }

        @media (min-width: 840px) {
            form {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                column-gap: 24px;
            }
        }

        .form-section-title {
            grid-column: 1 / -1;
            margin-top: 4px;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: #666;
        }

        .form-row {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-row.full {
            grid-column: 1 / -1;
        }

        label {
            font-size: 13px;
            font-weight: 500;
            color: #333;
        }

        label span.required {
            color: var(--fos-accent);
        }

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        input[type="date"],
          input[type="number"],
            input[type="password"],
        select,
        textarea {
            width: 100%;
            padding: 10px 11px;
            border-radius: 10px;
            border: 1px solid var(--fos-border);
            font-size: 13px;
            font-family: inherit;
            background: #fafafa;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
        }
        
        select { height:35px; }

        textarea {
            min-height: 120px;
            resize: vertical;
        }

        input:focus,
        select:focus,
        textarea:focus {
            outline: none;
            border-color: var(--fos-accent);
            background: #fff;
            box-shadow: 0 0 0 1px rgba(199,161,90,0.3);
        }

        .hint {
            font-size: 11px;
            color: #777;
        }

        .field-error {
            font-size: 11px;
            color: var(--fos-error);
            margin-top: 2px;
        }

        .file-input-wrapper {
            border-radius: 10px;
            border: 1px dashed #ccc;
            padding: 12px 12px 10px;
            background: #fafafa;
        }

        .file-input-wrapper input[type="file"] {
            padding: 0;
            border: none;
            background: transparent;
        }

        .file-input-wrapper .hint {
            margin-top: 4px;
        }

        .form-footer {
            grid-column: 1 / -1;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            margin-top: 4px;
            justify-content: space-between;
        }

        .trusted-text {
            font-size: 11px;
            color: #777;
        }

        .btn-primary {
            border: none;
            border-radius: 999px;
            padding: 10px 20px;
            font-size: 13px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.16em;
            background: var(--fos-accent);
            color: #1a1a1a;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 10px 24px rgba(0,0,0,0.18);
            transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(0,0,0,0.22);
        }

        .btn-primary:active {
            transform: translateY(0);
            box-shadow: 0 8px 18px rgba(0,0,0,0.18);
        }

        .btn-primary[disabled] {
            opacity: 0.7;
            cursor: progress;
            box-shadow: none;
        }

        footer {
            padding: 12px 16px 18px;
            font-size: 11px;
            color: #777;
            text-align: center;
        }

        .small-inline {
            font-size: 11px;
            color: #999;
        }
        
        .brand-logo-img {
    height: 84px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ===== Consolidated from inline <style> block #3 ===== */
:root {
            --fos-bg: #f7f7f7;
            --fos-dark: #1c1c1f;
            --fos-accent: #c7a15a;
            --fos-border: #e0e0e0;
            --fos-error: #c0392b;
            --fos-success: #2e7d32;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: var(--fos-bg);
            color: #222;
        }

        .layout {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        header {
            background: var(--fos-dark);
            color: #fff;
            padding: 18px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        }

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

        .brand-logo-img {
            height: 42px;
            width: auto;
            display: block;
            object-fit: contain;
        }

        .brand-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .brand-text span:first-child {
            font-weight: 600;
            letter-spacing: 0.1em;
            font-size: 12px;
            text-transform: uppercase;
        }

        .brand-text span:last-child {
            font-weight: 400;
            font-size: 11px;
            opacity: 0.8;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .header-tagline {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            color: rgba(255,255,255,0.7);
        }

        main {
            flex: 1;
            display: flex;
            justify-content: center;
            padding: 32px 16px 40px;
        }

        .card {
            background: #fff;
            max-width: 100%;
            width: 100%;
            border-radius: 14px;
            box-shadow: 0 18px 40px rgba(0,0,0,0.08);
            padding: 28px 24px 24px;
        }

        @media (min-width: 900px) {
            .card {
                padding: 32px 36px 30px;
            }
        }

        .card-header {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 20px;
        }

        .card-title {
            font-size: 22px;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--fos-dark);
        }

        .card-subtitle {
            font-size: 13px;
            color: #555;
            max-width: 640px;
        }

        .accent-bar {
            width: 90px;
            height: 3px;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--fos-accent), #f5d89f);
            margin-top: 6px;
        }

        .alert {
            padding: 12px 14px;
            border-radius: 10px;
            margin-bottom: 18px;
            font-size: 13px;
            line-height: 1.5;
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }

        .alert-success {
            background: #e9f5ec;
            color: var(--fos-success);
            border: 1px solid #c6e4cc;
        }

        .alert-error {
            background: #fdecea;
            color: var(--fos-error);
            border: 1px solid #f5c6c0;
        }

        .alert strong {
            display: block;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .section-title {
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: #666;
            margin-bottom: 6px;
        }

        .summary-section,
        .notes-section {
            margin-bottom: 32px;
        }

        .summary-section section,
        .notes-section section {
            width: 100%;
        }

        .incident-summary {
            border-radius: 12px;
            border: 1px solid var(--fos-border);
            padding: 14px 14px 8px;
            background: #fafafa;
            font-size: 13px;
        }

        .incident-summary table {
            width: 100%;
            border-collapse: collapse;
        }

        .incident-summary th,
        .incident-summary td {
            text-align: left;
            padding: 4px 2px;
            vertical-align: top;
        }

        .incident-summary th {
            width: 150px;
            font-weight: 500;
            color: #777;
            padding-right: 10px;
            font-size: 12px;
        }

        .incident-summary td {
            font-size: 13px;
        }

        .incident-description {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed #ddd;
            font-size: 13px;
            line-height: 1.6;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            padding: 3px 9px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            border: 1px solid rgba(0,0,0,0.1);
        }

        .badge.status {
            background: #111;
            color: #fff;
            border-color: #000;
        }

        .badge.type {
            background: #f3e8d9;
            color: #5c4424;
            border-color: #e2c89e;
            margin-left: 6px;
        }

        .notes-panel {
            border-radius: 12px;
            border: 1px solid var(--fos-border);
            padding: 14px 14px 10px;
            background: #fafafa;
            font-size: 13px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .note-list {
           /* 
 max-height: 340px;
            overflow-y: auto;
 */
            padding-right: 2px;
        }

        .note {
            padding: 18px 18px 18px;
            border-radius: 10px;
            background: #fff;
            border: 1px solid #e4e4e4;
            margin-bottom: 8px;
        }

        .note-header {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 4px;
            margin-bottom: 4px;
        }

        .note-meta {
            font-size: 11px;
            color: #777;
        }

        .note-source {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.14em;
        }

        .note-source.customer {
            color: #2e7d32;
        }

        .note-source.fos {
            color: #c7a15a;
        }

        .note-body {
            font-size: 13px;
            line-height: 1.5;
            white-space: pre-wrap;
        }

        .note-empty {
            font-size: 12px;
            color: #777;
        }

        .add-note-form textarea {
            width: 100%;
            border-radius: 10px;
            border: 1px solid var(--fos-border);
            padding: 9px 10px;
            font-size: 13px;
            font-family: inherit;
            resize: vertical;
            min-height: 80px;
            background: #fff;
        }

        .add-note-form textarea:focus {
            outline: none;
            border-color: var(--fos-accent);
            box-shadow: 0 0 0 1px rgba(199,161,90,0.3);
        }

        .add-note-form button {
            margin-top: 8px;
            border: none;
            border-radius: 999px;
            padding: 8px 16px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.16em;
            background: var(--fos-accent);
            color: #1a1a1a;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 10px 24px rgba(0,0,0,0.14);
        }

        .add-note-form button:hover {
            box-shadow: 0 14px 26px rgba(0,0,0,0.18);
        }

        .host-label {
            font-size: 11px;
            color: #999;
            margin-top: 10px;
        }

        footer {
            padding: 12px 16px 18px;
            font-size: 11px;
            color: #777;
            text-align: center;
        }

/* ===== Consolidated from inline <style> block #4 ===== */
.attachment-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .attachment-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 10px 0;
        border-bottom: 1px solid #ddd;
    }

    /* Set fixed preview container width (adjust as desired) */
    .attachment-preview-container {
        width: 120px;   /* keeps alignment consistent */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .attachment-preview {
        max-height: 100px;
        max-width: 120px;
        height: auto;
        display: block;
        border-radius: 4px;
    }

    .no-preview {
        font-size: 12px;
        color: #777;
        text-align: center;
    }

    .attachment-info {
        flex-grow: 1;
    }

    .attachment-name {
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    
    .input-error {
    border: 2px solid #d9534f !important;
    background-color: #ffe5e5;
    
   
}

 .costswarning { background-color: #ffe5e5 !important; color:#000; font-weight:bold; padding:8px;  }
 
 .header-actions {
            font-size: 12px;
            color: rgba(255,255,255,0.75);
            display: flex;
            gap: 14px;
            align-items: center;
        }
        .header-actions a { color: #fff; text-decoration: none; opacity: 0.9; }
        .header-actions a:hover { opacity: 1; text-decoration: underline; }


.openincident td { background-color: rgba(219, 250, 177, 0.45); }
.openincident .badge { background-color: rgba(219, 250, 177, 0.95); }

.delattachment { float:right; text-decoration:underline; cursor:pointer; }
