/*
=========================================================
NCO顧客・業務記録
共通デザイン
=========================================================
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --navy: #17365d;
    --navy-dark: #102a49;

    --blue: #2f6fb0;
    --blue-light: #eaf3fc;

    --green: #29885b;
    --green-light: #eaf7f0;

    --orange: #d97919;
    --orange-light: #fff3e5;

    --red: #c44a4a;
    --red-light: #fff0f0;

    --purple: #6a58a8;
    --purple-light: #f1edfb;

    --gray: #5f6770;
    --gray-light: #f3f5f7;

    --border: #d8dee5;

    --text: #1d2732;
    --text-sub: #5e6975;

    --white: #ffffff;
}


/*
=========================================================
基本
=========================================================
*/

body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        Meiryo,
        sans-serif;

    background:
        #eef2f6;

    color:
        var(--text);

    font-size:
        20px;

    line-height:
        1.75;
}

a {
    color:
        #0758b0;
}

a:hover {
    opacity:
        0.82;
}


/*
=========================================================
上部ヘッダー

固定しない。
スクロールすると上へ消える。
=========================================================
*/

header {
    background:
        linear-gradient(
            135deg,
            var(--navy-dark),
            var(--navy)
        );

    border-bottom:
        4px solid
        #5ca4e6;

    position:
        static;

    width:
        100%;

    box-shadow:
        0 3px 10px
        rgba(
            0,
            0,
            0,
            0.16
        );
}

.header-inner {
    max-width:
        1120px;

    margin:
        0 auto;

    padding:
        13px 16px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        18px;
}

.site-title {
    color:
        #fff;

    font-size:
        25px;

    font-weight:
        900;

    line-height:
        1.25;

    letter-spacing:
        0.01em;

    white-space:
        nowrap;

    flex-shrink:
        0;
}

.header-nav {
    display:
        flex;

    flex-wrap:
        nowrap;

    gap:
        7px;

    align-items:
        center;

    justify-content:
        flex-end;

    white-space:
        nowrap;
}

.header-logout-form {
    margin:
        0;

    padding:
        0;

    display:
        inline-block;

    width:
        auto;
}

.header-link {
    display:
        inline-block;

    padding:
        9px 12px;

    background:
        rgba(
            255,
            255,
            255,
            0.97
        );

    color:
        var(--navy-dark);

    text-decoration:
        none;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.7
        );

    border-radius:
        9px;

    font-size:
        16px;

    font-weight:
        900;

    line-height:
        1.25;

    box-shadow:
        0 2px 6px
        rgba(
            0,
            0,
            0,
            0.12
        );

    white-space:
        nowrap;
}

.header-link:hover {
    background:
        #eaf4ff;

    opacity:
        1;
}

.header-nav button.header-link {
    width:
        auto;

    margin:
        0;

    background:
        #fff;

    color:
        var(--navy-dark);
}


/*
=========================================================
メイン
=========================================================
*/

main {
    width:
        100%;

    max-width:
        1120px;

    margin:
        28px auto;

    padding:
        0 18px 110px;
}


/*
=========================================================
カード
=========================================================
*/

.card {
    background:
        var(--white);

    border:
        1px solid
        #e2e7ec;

    border-radius:
        17px;

    padding:
        25px;

    margin-bottom:
        21px;

    box-shadow:
        0 5px 18px
        rgba(
            28,
            46,
            66,
            0.09
        );
}

.card > h1:first-child,
.card > h2:first-child {
    border-left:
        7px solid
        var(--blue);

    padding-left:
        13px;
}


/*
=========================================================
文字
=========================================================
*/

h1 {
    font-size:
        33px;

    line-height:
        1.35;

    margin:
        0 0 21px;

    color:
        var(--navy-dark);
}

h2 {
    font-size:
        27px;

    line-height:
        1.4;

    margin:
        0 0 18px;

    color:
        var(--navy-dark);
}

h3 {
    font-size:
        23px;

    color:
        var(--navy);
}

p {
    margin-top:
        8px;
}


/*
=========================================================
入力欄
=========================================================
*/

label {
    display:
        block;

    margin:
        14px 0 7px;

    font-weight:
        900;

    font-size:
        19px;

    color:
        var(--navy-dark);
}

input,
select,
textarea {
    width:
        100%;

    padding:
        14px 15px;

    font-size:
        20px;

    font-family:
        inherit;

    border:
        2px solid
        #c6cdd5;

    border-radius:
        10px;

    background:
        #fff;

    color:
        var(--text);

    transition:
        border-color 0.15s,
        box-shadow 0.15s,
        background 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    outline:
        none;

    border-color:
        var(--blue);

    box-shadow:
        0 0 0 4px
        rgba(
            47,
            111,
            176,
            0.15
        );

    background:
        #fcfeff;
}

textarea {
    min-height:
        145px;

    resize:
        vertical;

    line-height:
        1.7;
}

input::placeholder,
textarea::placeholder {
    color:
        #8b949e;
}


/*
=========================================================
ボタン
=========================================================
*/

button,
.button {
    display:
        inline-block;

    padding:
        13px 18px;

    border:
        0;

    border-radius:
        10px;

    background:
        var(--blue);

    color:
        #fff;

    text-decoration:
        none;

    font-size:
        19px;

    font-family:
        inherit;

    font-weight:
        900;

    line-height:
        1.3;

    cursor:
        pointer;

    box-shadow:
        0 3px 8px
        rgba(
            47,
            111,
            176,
            0.23
        );

    transition:
        transform 0.12s,
        box-shadow 0.12s,
        opacity 0.12s;
}

button:hover,
.button:hover {
    opacity:
        0.9;

    transform:
        translateY(-1px);
}

button:active,
.button:active {
    transform:
        translateY(1px);
}

.button-light {
    background:
        #fff;

    color:
        var(--navy);

    border:
        2px solid
        #b8c5d2;

    box-shadow:
        none;
}

.button-danger {
    background:
        var(--red-light);

    color:
        #a52d2d;

    border:
        2px solid
        #e2aaaa;

    box-shadow:
        none;
}


/*
=========================================================
共通配置
=========================================================
*/

.actions {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        10px;

    margin-top:
        21px;
}

.form-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            2,
            1fr
        );

    gap:
        17px;
}

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


/*
=========================================================
案件詳細・顧客詳細の情報欄
コンパクト表示
=========================================================
*/

.info-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap:
        10px;
}

.info-box {
    background:
        linear-gradient(
            135deg,
            #f7fafd,
            #edf4fb
        );

    border:
        1px solid
        #d9e6f2;

    border-left:
        5px solid
        #76a9d6;

    border-radius:
        10px;

    padding:
        10px 12px;

    min-height:
        76px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        center;

    overflow-wrap:
        anywhere;
}

.info-label,
.label {
    color:
        var(--text-sub);

    font-size:
        14px;

    font-weight:
        700;

    margin-bottom:
        3px;
}

.info-value,
.value {
    font-size:
        18px;

    line-height:
        1.45;

    font-weight:
        800;

    word-break:
        break-word;

    white-space:
        pre-wrap;
}

.meta {
    color:
        var(--text-sub);

    font-size:
        18px;

    line-height:
        1.8;

    margin-top:
        8px;
}

.help,
.search-help,
.postal-status {
    font-size:
        17px;

    color:
        var(--text-sub);

    margin-top:
        7px;
}


/*
=========================================================
案件詳細の最初のカードを少しコンパクト
=========================================================
*/

main > .card:first-of-type {
    padding:
        20px;
}


/*
=========================================================
成功・エラー
=========================================================
*/

.message {
    padding:
        15px;

    margin-bottom:
        17px;

    border:
        2px solid
        #9bd0ae;

    background:
        var(--green-light);

    color:
        #175b3b;

    border-radius:
        11px;

    font-size:
        18px;

    font-weight:
        700;
}

.error {
    padding:
        15px;

    margin-bottom:
        17px;

    border:
        2px solid
        #e0aaaa;

    background:
        var(--red-light);

    color:
        #962d2d;

    border-radius:
        11px;

    font-size:
        18px;

    font-weight:
        700;

    white-space:
        pre-wrap;
}


/*
=========================================================
状態・タグ
=========================================================
*/

.status {
    display:
        inline-block;

    padding:
        6px 10px;

    border-radius:
        8px;

    background:
        var(--orange-light);

    color:
        #9b520a;

    border:
        1px solid
        #f0c18e;

    font-size:
        16px;

    font-weight:
        900;
}

.tag {
    display:
        inline-block;

    padding:
        6px 11px;

    margin:
        3px;

    background:
        var(--purple-light);

    color:
        #51408c;

    border:
        1px solid
        #cdc4ed;

    border-radius:
        20px;

    font-size:
        16px;

    font-weight:
        700;
}


/*
=========================================================
検索
=========================================================
*/

.toolbar {
    display:
        flex;

    gap:
        10px;

    align-items:
        stretch;

    margin-bottom:
        18px;
}

.toolbar form {
    display:
        flex;

    gap:
        8px;

    flex:
        1;
}

.toolbar input {
    flex:
        1;
}

.search-row {
    display:
        flex;

    gap:
        10px;
}

.search-row input {
    flex:
        1;
}

.search-row button {
    background:
        var(--orange);
}

.filters {
    display:
        grid;

    grid-template-columns:
        repeat(
            4,
            1fr
        );

    gap:
        12px;

    margin-top:
        16px;

    padding:
        16px;

    background:
        #f6f9fc;

    border:
        1px solid
        #dce5ed;

    border-radius:
        12px;
}


/*
=========================================================
トップページ操作カード
=========================================================
*/

.dashboard-actions {
    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap:
        16px;

    margin-top:
        21px;
}

.action-card {
    display:
        block;

    color:
        var(--text);

    text-decoration:
        none;

    padding:
        25px;

    border-radius:
        16px;

    border:
        1px solid
        #d9e1e8;

    box-shadow:
        0 4px 14px
        rgba(
            30,
            48,
            68,
            0.08
        );

    transition:
        transform 0.14s,
        box-shadow 0.14s;
}

.action-card:hover {
    opacity:
        1;

    transform:
        translateY(-3px);

    box-shadow:
        0 8px 20px
        rgba(
            30,
            48,
            68,
            0.13
        );
}

.action-card strong {
    display:
        block;

    font-size:
        24px;

    margin-bottom:
        8px;
}

.dashboard-actions .action-card:nth-child(1) {
    background:
        linear-gradient(
            135deg,
            #eaf7f0,
            #f8fffb
        );

    border-top:
        6px solid
        var(--green);
}

.dashboard-actions .action-card:nth-child(1) strong {
    color:
        #1c7149;
}

.dashboard-actions .action-card:nth-child(2) {
    background:
        linear-gradient(
            135deg,
            #eaf3fc,
            #f8fbff
        );

    border-top:
        6px solid
        var(--blue);
}

.dashboard-actions .action-card:nth-child(2) strong {
    color:
        #205b96;
}

.dashboard-actions .action-card:nth-child(3) {
    background:
        linear-gradient(
            135deg,
            #fff3e5,
            #fffaf4
        );

    border-top:
        6px solid
        var(--orange);
}

.dashboard-actions .action-card:nth-child(3) strong {
    color:
        #a9570c;
}


/*
=========================================================
統計
=========================================================
*/

.stats {
    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap:
        16px;

    margin-top:
        20px;
}

.stat {
    background:
        #fff;

    border-radius:
        16px;

    padding:
        23px;

    border:
        1px solid
        #dde3e8;

    box-shadow:
        0 4px 14px
        rgba(
            30,
            48,
            68,
            0.08
        );
}

.stats .stat:nth-child(1) {
    border-left:
        7px solid
        var(--green);

    background:
        linear-gradient(
            90deg,
            var(--green-light),
            #fff 45%
        );
}

.stats .stat:nth-child(2) {
    border-left:
        7px solid
        var(--blue);

    background:
        linear-gradient(
            90deg,
            var(--blue-light),
            #fff 45%
        );
}

.stats .stat:nth-child(3) {
    border-left:
        7px solid
        var(--orange);

    background:
        linear-gradient(
            90deg,
            var(--orange-light),
            #fff 45%
        );
}

.stat-number {
    font-size:
        40px;

    line-height:
        1;

    font-weight:
        900;

    color:
        var(--navy-dark);
}

.stat-label {
    font-size:
        18px;

    color:
        var(--text-sub);

    margin-top:
        11px;

    font-weight:
        700;
}


/*
=========================================================
顧客一覧・検索結果・最近の案件
=========================================================
*/

.customer,
.result,
.recent-case {
    padding:
        21px;

    margin-bottom:
        13px;

    border:
        1px solid
        #dde4ea;

    border-left:
        6px solid
        #83acd2;

    border-radius:
        12px;

    background:
        #fbfdff;
}

.customer:last-child,
.result:last-child,
.recent-case:last-child {
    margin-bottom:
        0;
}

.customer:hover,
.result:hover,
.recent-case:hover {
    background:
        #f3f8fd;
}

.customer-name,
.result-title,
.recent-title {
    font-size:
        24px;

    font-weight:
        900;

    color:
        var(--navy-dark);
}

.customer-name a,
.result-title a,
.recent-title a {
    font-weight:
        900;
}


/*
=========================================================
案件一覧
=========================================================
*/

.case {
    padding:
        20px;

    margin-bottom:
        13px;

    background:
        #fffaf4;

    border:
        1px solid
        #f0d6b8;

    border-left:
        6px solid
        var(--orange);

    border-radius:
        12px;
}

.case:last-child {
    margin-bottom:
        0;
}

.case-title {
    font-size:
        23px;

    font-weight:
        900;

    color:
        #8d4808;
}

.case-meta {
    color:
        var(--text-sub);

    font-size:
        18px;

    line-height:
        1.8;

    margin-top:
        8px;
}


/*
=========================================================
対応履歴
=========================================================
*/

.log {
    border-left:
        6px solid
        var(--blue);

    padding:
        10px 0 22px 20px;

    margin:
        0 0 8px 5px;

    background:
        linear-gradient(
            90deg,
            #edf5fc,
            transparent 55%
        );
}

.log-date {
    font-size:
        19px;

    font-weight:
        900;

    color:
        var(--navy);
}

.log-type {
    display:
        inline-block;

    margin-left:
        7px;

    padding:
        4px 9px;

    background:
        var(--orange-light);

    color:
        #94510e;

    border:
        1px solid
        #efc592;

    border-radius:
        7px;

    font-size:
        15px;

    font-weight:
        800;
}

.log-content {
    margin-top:
        10px;

    font-size:
        19px;

    line-height:
        1.8;

    white-space:
        pre-wrap;
}


/*
=========================================================
困っている内容
=========================================================
*/

.issue {
    background:
        #fff8ee;

    padding:
        15px;

    margin-top:
        13px;

    border:
        1px solid
        #f1d0a9;

    border-left:
        5px solid
        var(--orange);

    border-radius:
        10px;

    white-space:
        pre-wrap;
}


/*
=========================================================
郵便番号
=========================================================
*/

.postal-row {
    display:
        flex;

    gap:
        8px;
}

.postal-row input {
    flex:
        1;
}

#postal_lookup {
    background:
        var(--green);
}


/*
=========================================================
添付アップロード
=========================================================
*/

.drop-zone {
    margin-top:
        10px;

    padding:
        30px 18px;

    border:
        3px dashed
        #6b9bc7;

    border-radius:
        15px;

    background:
        linear-gradient(
            135deg,
            #f5faff,
            #eaf4fc
        );

    text-align:
        center;

    cursor:
        pointer;

    color:
        var(--navy);

    transition:
        0.2s;
}

.drop-zone:hover {
    background:
        #e4f1fc;
}

.drop-zone.dragover {
    background:
        #dbeeff;

    border-color:
        var(--blue);
}

.drop-zone strong {
    display:
        block;

    font-size:
        22px;

    margin-bottom:
        7px;
}

.drop-zone input {
    display:
        none;
}

.selected-files {
    margin-top:
        13px;

    padding:
        12px;

    font-size:
        17px;

    background:
        var(--green-light);

    border-radius:
        10px;
}


/*
=========================================================
添付一覧
=========================================================
*/

.attachments-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(
                240px,
                1fr
            )
        );

    gap:
        17px;

    margin-top:
        20px;
}

.attachment-card {
    background:
        #fff;

    border:
        1px solid
        #d8e0e7;

    border-radius:
        14px;

    overflow:
        hidden;

    box-shadow:
        0 4px 12px
        rgba(
            28,
            46,
            66,
            0.08
        );
}

.attachment-preview {
    min-height:
        160px;

    background:
        #edf2f6;

    display:
        flex;

    justify-content:
        center;

    align-items:
        center;

    overflow:
        hidden;
}

.attachment-preview img {
    width:
        100%;

    height:
        200px;

    object-fit:
        cover;

    display:
        block;
}

.attachment-preview video {
    width:
        100%;

    max-height:
        230px;

    background:
        #000;
}

.file-icon {
    display:
        block;

    font-size:
        52px;

    padding:
        38px;

    text-decoration:
        none;
}

.attachment-info {
    padding:
        15px;
}

.attachment-name {
    font-size:
        18px;

    font-weight:
        900;

    color:
        var(--navy-dark);

    word-break:
        break-word;
}

.attachment-meta {
    margin-top:
        5px;

    color:
        var(--text-sub);

    font-size:
        15px;
}

.attachment-buttons {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;

    margin-top:
        10px;
}


/*
=========================================================
空データ
=========================================================
*/

.empty {
    padding:
        24px;

    font-size:
        19px;

    color:
        var(--text-sub);

    background:
        #f7f9fb;

    border:
        1px dashed
        #c6d0d8;

    border-radius:
        11px;
}


/*
=========================================================
右下 上下ボタン
=========================================================
*/

.page-jump-buttons {
    position:
        fixed;

    right:
        17px;

    bottom:
        18px;

    z-index:
        9999;

    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;
}

.page-jump-button {
    width:
        62px;

    height:
        62px;

    border-radius:
        50%;

    border:
        3px solid
        #fff;

    color:
        #fff;

    font-size:
        30px;

    font-weight:
        900;

    line-height:
        1;

    box-shadow:
        0 5px 15px
        rgba(
            0,
            0,
            0,
            0.26
        );

    cursor:
        pointer;

    transition:
        transform 0.13s,
        background 0.13s;
}

.page-jump-button:first-child {
    background:
        var(--blue);
}

.page-jump-button:last-child {
    background:
        var(--orange);
}

.page-jump-button:hover {
    transform:
        translateY(-2px);
}

.page-jump-button:active {
    transform:
        translateY(2px);
}


/*
=========================================================
広いパソコン
案件情報は4列
=========================================================
*/

@media (
    min-width: 1200px
) {

    .info-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(
                    0,
                    1fr
                )
            );
    }
}


/*
=========================================================
少し狭いパソコン・タブレット
=========================================================
*/

@media (
    min-width: 761px
) and (
    max-width: 1050px
) {

    .header-inner {
        max-width:
            100%;

        padding-left:
            12px;

        padding-right:
            12px;
    }

    .site-title {
        font-size:
            21px;
    }

    .header-link {
        font-size:
            14px;

        padding:
            8px 9px;
    }

    .header-nav {
        gap:
            5px;
    }

    .info-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }
}


/*
=========================================================
スマホ
=========================================================
*/

@media (
    max-width: 760px
) {

    body {
        font-size:
            21px;

        line-height:
            1.72;
    }

    .header-inner {
        display:
            block;

        padding:
            14px 12px;
    }

    .site-title {
        font-size:
            25px;

        white-space:
            normal;

        margin-bottom:
            12px;
    }

    .header-nav {
        display:
            grid;

        grid-template-columns:
            repeat(
                2,
                1fr
            );

        gap:
            8px;

        white-space:
            normal;
    }

    .header-link,
    .header-nav button.header-link {
        width:
            100%;

        text-align:
            center;

        font-size:
            18px;

        padding:
            12px 8px;
    }

    .header-logout-form {
        width:
            100%;
    }

    main {
        padding:
            0 11px 120px;

        margin-top:
            16px;
    }

    .card {
        padding:
            19px 15px;

        border-radius:
            15px;
    }

    h1 {
        font-size:
            30px;
    }

    h2 {
        font-size:
            26px;
    }

    h3 {
        font-size:
            23px;
    }

    input,
    select,
    textarea {
        font-size:
            21px;

        padding:
            15px;
    }

    label {
        font-size:
            20px;
    }

    button,
    .button {
        font-size:
            20px;

        padding:
            15px 16px;
    }

    .form-grid,
    .stats,
    .dashboard-actions,
    .filters {
        grid-template-columns:
            1fr;
    }

    /*
     * スマホの案件情報は2列
     */
    .info-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap:
            8px;
    }

    .info-box {
        padding:
            9px 10px;

        min-height:
            68px;
    }

    .info-label,
    .label {
        font-size:
            15px;
    }

    .info-value,
    .value {
        font-size:
            18px;

        line-height:
            1.4;
    }

    .meta,
    .case-meta {
        font-size:
            19px;
    }

    .customer-name,
    .result-title,
    .recent-title,
    .case-title {
        font-size:
            24px;
    }

    .toolbar,
    .toolbar form,
    .search-row {
        display:
            block;
    }

    .toolbar button,
    .toolbar .button,
    .search-row button {
        width:
            100%;

        margin-top:
            9px;

        text-align:
            center;
    }

    .actions,
    .customer-actions,
    .result-actions,
    .attachment-buttons {
        display:
            block;
    }

    .actions .button,
    .actions button,
    .customer-actions .button,
    .result-actions .button,
    .attachment-buttons .button,
    .attachment-buttons button {
        display:
            block;

        width:
            100%;

        text-align:
            center;

        margin-bottom:
            9px;
    }

    .postal-row {
        display:
            block;
    }

    .postal-row button {
        width:
            100%;

        margin-top:
            9px;
    }

    .attachments-grid {
        grid-template-columns:
            1fr;
    }

    .stat-number {
        font-size:
            44px;
    }

    .action-card strong {
        font-size:
            26px;
    }

    .drop-zone {
        padding:
            24px 14px;
    }

    .page-jump-buttons {
        right:
            11px;

        bottom:
            13px;
    }

    .page-jump-button {
        width:
            65px;

        height:
            65px;

        font-size:
            31px;
    }
}


/*
=========================================================
かなり小さいスマホ
=========================================================
*/

@media (
    max-width: 430px
) {

    /*
     * 小さいiPhoneでは情報を1列にする
     * 文字が窮屈になるのを防ぐ
     */
    .info-grid {
        grid-template-columns:
            1fr;
    }

    .info-box {
        min-height:
            auto;

        padding:
            10px 11px;
    }

    .info-label {
        font-size:
            15px;
    }

    .info-value {
        font-size:
            19px;
    }
}