
.svhcpt-portal,
.svhcpt-login {
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.svhcpt-portal *,
.svhcpt-login * {
    box-sizing: border-box;
}

.svhcpt-header {
    margin-bottom: 22px;
}

.svhcpt-header h2 {
    margin: 0 0 4px;
    line-height: 1.15;
}

.svhcpt-card,
.svhcpt-project-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    padding: 24px;
    margin: 0 0 22px;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
    overflow-wrap: anywhere;
}

.svhcpt-project-card h3,
.svhcpt-project-card h4 {
    line-height: 1.2;
}

.svhcpt-project-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.svhcpt-project-top h3 {
    margin: 0;
}

.svhcpt-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #14235f;
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.svhcpt-note {
    background: #f8f6ef;
    border-left: 4px solid #DD9933;
    padding: 14px;
    margin: 16px 0;
}

.svhcpt-notice {
    background: #eef8f0;
    border: 1px solid #b9e0bf;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.svhcpt-file-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.svhcpt-file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.svhcpt-file-list span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.svhcpt-file-list small {
    color: #777;
    margin-left: 8px;
}

.svhcpt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #14235f;
    color: #fff !important;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    min-height: 42px;
}

.svhcpt-button.small {
    padding: 7px 11px;
    font-size: 13px;
    min-height: 34px;
    flex: 0 0 auto;
}

.svhcpt-status-form,
.svhcpt-upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.svhcpt-status-form select,
.svhcpt-upload-form select,
.svhcpt-upload-form input[type=file],
.svhcpt-login input[type=text],
.svhcpt-login input[type=password] {
    border: 1px solid #ddd;
    padding: 9px;
    border-radius: 6px;
    max-width: 100%;
}

.svhcpt-message-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d7dce2;
    border-radius: 6px;
    margin-bottom: 10px;
    resize: vertical;
}

.svhcpt-message-form .svhcpt-button {
    margin-bottom: 8px;
}

.svhcpt-message-history {
    margin: 12px 0 18px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e3e7ed;
    border-radius: 8px;
}

.svhcpt-message-item {
    padding: 10px 0;
    border-top: 1px solid #e3e7ed;
}

.svhcpt-message-item:first-of-type {
    border-top: 0;
}

.svhcpt-message-item p {
    margin: 6px 0 0;
}

.svhcpt-dashboard-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.svhcpt-client-name {
    margin: 4px 0 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.svhcpt-project-count {
    text-align: center;
    min-width: 110px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e3e7ed;
}

.svhcpt-count-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.svhcpt-count-label {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #5d6673;
}

.svhcpt-status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.svhcpt-assigned-client {
    margin: 4px 0 0;
    color: #5d6673;
    font-size: 14px;
}

.svhcpt-status-in-progress { background: #DD9933; color: #fff; }
.svhcpt-status-proofing { background: #2563eb; color: #fff; }
.svhcpt-status-needs-revisions { background: #ea580c; color: #fff; }
.svhcpt-status-approved { background: #15803d; color: #fff; }
.svhcpt-status-delivered { background: #374151; color: #fff; }

@media (max-width: 768px) {
    .svhcpt-dashboard-summary {
        align-items: stretch;
    }

    .svhcpt-dashboard-summary > div:first-child {
        width: 100%;
    }

    .svhcpt-project-count {
        text-align: left;
        min-width: 0;
        flex: 1 1 160px;
    }

    .svhcpt-status-summary {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .svhcpt-card,
    .svhcpt-project-card,
    .svhcpt-dashboard-summary {
        padding: 18px;
        border-radius: 10px;
    }

    .svhcpt-header h2 {
        font-size: 24px;
    }

    .svhcpt-client-name {
        font-size: 18px;
    }

    .svhcpt-project-top {
        display: block;
    }

    .svhcpt-project-top .svhcpt-status {
        margin-top: 10px;
    }

    .svhcpt-status-summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .svhcpt-status-summary .svhcpt-status,
    .svhcpt-project-top .svhcpt-status {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .svhcpt-file-list li {
        display: block;
    }

    .svhcpt-file-list small {
        display: block;
        margin: 4px 0 0;
    }

    .svhcpt-file-list .svhcpt-button.small {
        width: 100%;
        margin-top: 10px;
    }

    .svhcpt-status-form,
    .svhcpt-upload-form {
        display: block;
    }

    .svhcpt-status-form select,
    .svhcpt-upload-form select,
    .svhcpt-upload-form input[type=file],
    .svhcpt-status-form .svhcpt-button,
    .svhcpt-upload-form .svhcpt-button,
    .svhcpt-message-form .svhcpt-button {
        width: 100%;
        margin: 0 0 10px;
    }

    .svhcpt-button {
        min-height: 46px;
    }
}

@media (max-width: 420px) {
    .svhcpt-card,
    .svhcpt-project-card,
    .svhcpt-dashboard-summary {
        padding: 15px;
        margin-bottom: 16px;
    }

    .svhcpt-header h2 {
        font-size: 22px;
    }

    .svhcpt-project-card h3 {
        font-size: 20px;
    }

    .svhcpt-count-number {
        font-size: 24px;
    }
}


.svhcpt-project-card img {
    cursor: zoom-in;
}

.svhcpt-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.svhcpt-lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
}

.svhcpt-lightbox-close {
    position: fixed;
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.svhcpt-lightbox-caption {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 14px;
    color: #fff;
    text-align: center;
    font-size: 14px;
}


.svhcpt-file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.svhcpt-delete-file-form {
    margin: 0;
}

.svhcpt-button.danger {
    background: #b42318;
    border-color: #b42318;
}

.svhcpt-button.danger:hover {
    background: #8f1d14;
    border-color: #8f1d14;
}

@media (max-width: 600px) {
    .svhcpt-file-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .svhcpt-file-actions .svhcpt-button,
    .svhcpt-delete-file-form,
    .svhcpt-delete-file-form .svhcpt-button {
        width: 100%;
        text-align: center;
    }
}

.svhcpt-status-new-request { background: #7c3aed; color: #fff; }

.svhcpt-new-request-card {
    border-color: #d7c7ff;
    background: #fbfaff;
}

.svhcpt-muted {
    color: #5d6673;
    font-size: 14px;
}

.svhcpt-new-request-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.svhcpt-new-request-form input[type=text],
.svhcpt-new-request-form input[type=file],
.svhcpt-new-request-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7dce2;
    padding: 10px;
    border-radius: 6px;
}

.svhcpt-new-request-form textarea {
    resize: vertical;
}

@media (max-width: 640px) {
    .svhcpt-new-request-form .svhcpt-button {
        width: 100%;
    }
}

.svhcpt-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.svhcpt-start-project-toggle {
    white-space: nowrap;
}

.svhcpt-new-request-card[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .svhcpt-header-actions {
        width: 100%;
        justify-content: stretch;
    }
    .svhcpt-header-actions .svhcpt-project-count,
    .svhcpt-header-actions .svhcpt-start-project-toggle {
        width: 100%;
    }
}

.svhcpt-file-picker {
    display: grid;
    gap: 8px;
}

.svhcpt-file-help {
    margin: -2px 0 0;
}

.svhcpt-selected-files {
    list-style: none;
    padding: 0;
    margin: 2px 0 0;
    display: grid;
    gap: 8px;
}

.svhcpt-selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    background: #fff;
}

.svhcpt-selected-file-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    color: #333;
}

.svhcpt-remove-selected-file {
    border: 1px solid #b42318;
    background: #fff;
    color: #b42318;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.svhcpt-remove-selected-file:hover {
    background: #b42318;
    color: #fff;
}

@media (max-width: 640px) {
    .svhcpt-selected-file-item {
        align-items: stretch;
        flex-direction: column;
    }
    .svhcpt-remove-selected-file {
        width: 100%;
    }
}
