* {
    box-sizing: border-box;
}

:root {
    --sky-1: #4FC3F7; /* ¹àÀº ÇÏ´Ã */
    --sky-2: #29B6F6;
    --blue-1: #1E88E5; /* ¸ÞÀÎ */
    --blue-2: #1565C0; /* ÁøÇÑ */
    --blue-deep: #0D47A1;
    --accent: #00E5FF; /* Æ÷ÀÎÆ®(½Ã¾È) */
    --ink: #16324F;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #dfe8f0;
    -webkit-text-size-adjust: 100%;
}

/* Æù ÇÁ·¹ÀÓ */
.phone {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    box-shadow: 0 0 28px rgba(21,101,192,.18);
    position: relative;
    overflow-x: hidden;
}

/* »ó´Ü¹Ù */
.topbar {
    height: 56px;
    background: linear-gradient(135deg, var(--blue-1) 0%, var(--blue-2) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 17px;
    font-weight: bold;
}

    .topbar .sub {
        margin-left: auto;
        font-size: 13px;
        font-weight: normal;
        opacity: .9;
    }

.body-pad {
    padding: 20px 18px 78px;
}

/* ===== ·Î±×ÀÎ ===== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 70px 28px 40px;
    background: linear-gradient(165deg, var(--sky-1) 0%, var(--blue-1) 48%, var(--blue-deep) 100%);
}

.login-logo {
    text-align: center;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.login-sub {
    text-align: center;
    color: rgba(255,255,255,.8);
    font-size: 12.5px;
    letter-spacing: 2px;
    margin-bottom: 56px;
}

.fld {
    position: relative;
    margin-bottom: 18px;
}

    .fld input {
        width: 100%;
        height: 50px;
        border: none;
        border-radius: 25px;
        padding: 0 18px 0 46px;
        font-size: 15px;
        background: #fff;
        color: var(--ink);
        outline: none;
        box-shadow: 0 2px 8px rgba(13,71,161,.12);
    }

        .fld input:focus {
            box-shadow: 0 0 0 3px rgba(0,229,255,.45), 0 2px 8px rgba(13,71,161,.12);
        }

        .fld input::placeholder {
            color: #9bb0c4;
        }

    .fld .ico {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        color: var(--blue-1);
        opacity: .55;
        pointer-events: none;
    }

/* ÀÚµ¿¿Ï¼º ¸ñ·Ï */
.suggest {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(13,71,161,.28);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 210px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

    .suggest li {
        padding: 11px 18px;
        font-size: 14px;
        color: var(--ink);
        cursor: pointer;
    }

        .suggest li:hover, .suggest li.on {
            background: #e3f2fd;
        }

/* Ã¼Å©¹Ú½º ÁÙ */
.chk-row {
    display: flex;
    justify-content: space-between;
    margin: 26px 2px 32px;
}

.chk {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

    .chk input {
        display: none;
    }

    .chk .box {
        width: 17px;
        height: 17px;
        border-radius: 50%;
        background: rgba(255,255,255,.3);
        border: 1px solid rgba(255,255,255,.45);
        margin-right: 6px;
        position: relative;
        flex-shrink: 0;
    }

    .chk input:checked + .box {
        background: var(--accent);
        border-color: var(--accent);
    }

        .chk input:checked + .box::after {
            content: '';
            position: absolute;
            left: 5px;
            top: 2px;
            width: 5px;
            height: 9px;
            border: solid #0D47A1;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

.btn-main {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 26px;
    background: #fff;
    color: var(--blue-2);
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13,71,161,.25);
}

    .btn-main:active {
        background: #e3f2fd;
        transform: translateY(1px);
    }

.err {
    color: #fff;
    background: rgba(211,47,47,.9);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
}

.ok {
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
}

/* ===== ¸ñ·Ï °øÅë ===== */
.lnk-out {
    color: #fff;
    text-decoration: none;
    margin-left: 12px;
    opacity: .85;
    font-size: 12px;
}

    .lnk-out:hover {
        opacity: 1;
        text-decoration: underline;
    }

.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

    .search-row input {
        flex: 1;
        height: 42px;
        border: 1px solid #cfdce8;
        border-radius: 21px;
        padding: 0 16px;
        font-size: 14px;
        outline: none;
        color: var(--ink);
    }

        .search-row input:focus {
            border-color: var(--blue-1);
        }

.btn-sm {
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 21px;
    background: var(--blue-1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

    .btn-sm:active {
        background: var(--blue-2);
    }

.btn-add {
    display: block;
    text-align: center;
    height: 46px;
    line-height: 46px;
    border-radius: 23px;
    background: linear-gradient(135deg, var(--sky-2), var(--blue-1));
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 18px;
    box-shadow: 0 3px 10px rgba(30,136,229,.3);
}

    .btn-add:active {
        opacity: .85;
    }

.card {
    display: block;
    background: #fff;
    border: 1px solid #e1eaf3;
    border-left: 4px solid var(--blue-1);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 2px 6px rgba(21,101,192,.07);
}

    .card:active {
        background: #f5faff;
    }

    .card.off {
        border-left-color: #b0bec5;
        opacity: .6;
    }

.card-top {
    display: flex;
    align-items: center;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
}

.tag-off {
    margin-left: 8px;
    font-size: 11px;
    background: #90a4ae;
    color: #fff;
    border-radius: 9px;
    padding: 2px 8px;
}

.card-sub {
    font-size: 12.5px;
    color: #7a8fa3;
    margin-top: 4px;
}

.card-stat {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 12px;
    color: #5b7a94;
}

    .card-stat b {
        color: var(--blue-2);
        font-size: 13px;
    }

.empty {
    text-align: center;
    color: #90a4ae;
    font-size: 14px;
    padding: 50px 0;
}

.empty-sm {
    text-align: center;
    color: #a4b5c4;
    font-size: 13px;
    padding: 16px 0;
}

/* ===== ÆíÁý Æû ===== */
.back {
    color: #fff;
    text-decoration: none;
    font-size: 26px;
    line-height: 1;
    margin-right: 10px;
    margin-top: -3px;
}

.lbl {
    display: block;
    font-size: 12.5px;
    color: #5b7a94;
    margin: 14px 4px 6px;
    font-weight: bold;
}

.inp {
    width: 100%;
    height: 46px;
    border: 1px solid #cfdce8;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    background: #fff;
}

    .inp:focus {
        border-color: var(--blue-1);
        box-shadow: 0 0 0 3px rgba(30,136,229,.12);
    }

.inp-ro {
    width: 100%;
    height: 46px;
    line-height: 46px;
    border: 1px solid #e1eaf3;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: #7a8fa3;
    background: #f5f8fb;
}

.hint {
    font-size: 11.5px;
    color: #90a4ae;
    margin: 5px 4px 0;
}

.site-tag {
    display: inline-block;
    background: #e3f2fd;
    color: var(--blue-2);
    font-size: 12.5px;
    font-weight: bold;
    border-radius: 12px;
    padding: 4px 12px;
    margin-bottom: 6px;
}

.chk-line {
    display: flex;
    align-items: center;
    margin: 18px 4px 4px;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}

    .chk-line input {
        display: none;
    }

    .chk-line .box2 {
        width: 20px;
        height: 20px;
        border: 1px solid #b8cadb;
        border-radius: 5px;
        margin-right: 8px;
        position: relative;
        background: #fff;
        flex-shrink: 0;
    }

    .chk-line input:checked + .box2 {
        background: var(--blue-1);
        border-color: var(--blue-1);
    }

        .chk-line input:checked + .box2::after {
            content: '';
            position: absolute;
            left: 6px;
            top: 2px;
            width: 6px;
            height: 11px;
            border: solid #fff;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.btn-blue, .btn-red {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
}

.btn-blue {
    background: linear-gradient(135deg, var(--sky-2), var(--blue-1));
}

.btn-red {
    background: #e53935;
    flex: 0 0 90px;
}

    .btn-blue:active, .btn-red:active {
        opacity: .85;
    }

/* ¶óµð¿À ¼¼±×¸ÕÆ® */
.seg {
    display: flex;
    gap: 8px;
}

.seg-item {
    flex: 1;
    cursor: pointer;
}

    .seg-item input {
        display: none;
    }

    .seg-item span {
        display: block;
        text-align: center;
        height: 44px;
        line-height: 42px;
        border: 1px solid #cfdce8;
        border-radius: 22px;
        font-size: 14.5px;
        color: #7a8fa3;
        background: #fff;
    }

    .seg-item input:checked + span {
        background: var(--blue-1);
        border-color: var(--blue-1);
        color: #fff;
        font-weight: bold;
    }

/* ===== ÇÏÀ§ ¸ñ·Ï ===== */
.sec-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--blue-2);
    margin: 30px 2px 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e1eaf3;
}

.lnk-add {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--blue-1);
    text-decoration: none;
    font-weight: normal;
}

.row-item {
    display: block;
    background: #f7fbff;
    border: 1px solid #e1eaf3;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--ink);
}

    .row-item:active {
        background: #e3f2fd;
    }

    .row-item.off {
        opacity: .5;
    }

.row-main {
    font-size: 14.5px;
}

    .row-main .port {
        color: var(--blue-1);
        font-size: 13px;
        margin-left: 6px;
    }

.row-sub {
    font-size: 12px;
    color: #7a8fa3;
    margin-top: 3px;
}

.comm {
    font-size: 10.5px;
    border-radius: 8px;
    padding: 2px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

    .comm.serial {
        background: #e3f2fd;
        color: var(--blue-2);
    }

    .comm.contact {
        background: #fff3e0;
        color: #e65100;
    }

/* ===== ±â±â Ä«µå ===== */
.badge {
    margin-left: 8px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    border-radius: 10px;
    padding: 2px 8px;
}

.cnt {
    margin-left: 6px;
    color: #90a4ae;
    font-weight: normal;
    font-size: 12.5px;
}

.dev-card {
    background: #fff;
    border: 1px solid #e1eaf3;
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(21,101,192,.06);
}

    .dev-card.wait {
        border-left: 4px solid #FFA000;
        background: #fffdf5;
    }

    .dev-card.off {
        opacity: .6;
    }

.dev-head {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.dev-plat {
    font-size: 10.5px;
    font-weight: bold;
    color: #fff;
    background: #90a4ae;
    border-radius: 8px;
    padding: 2px 8px;
    margin-right: 8px;
    text-transform: uppercase;
}

    .dev-plat.ios {
        background: #455a64;
    }

    .dev-plat.android {
        background: #43a047;
    }

.dev-model, .dev-nick {
    font-size: 15px;
    font-weight: bold;
    color: var(--ink);
}

.dev-uid {
    font-size: 11px;
    color: #a4b5c4;
    font-family: Consolas, monospace;
    word-break: break-all;
    margin-bottom: 3px;
}

.dev-time {
    font-size: 11.5px;
    color: #7a8fa3;
}

.dev-form {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.inp-sm {
    flex: 1;
    height: 38px;
    border: 1px solid #cfdce8;
    border-radius: 19px;
    padding: 0 14px;
    font-size: 13.5px;
    color: var(--ink);
    outline: none;
    min-width: 0;
}

    .inp-sm:focus {
        border-color: var(--blue-1);
    }

.btn-ok, .btn-no {
    height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 19px;
    font-size: 13.5px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-ok {
    background: var(--blue-1);
}

.btn-no {
    background: #b0bec5;
}

    .btn-ok:active, .btn-no:active {
        opacity: .85;
    }

/* ===== Â÷´Ü±â Á¦¾î ===== */
.gate-card {
    background: #fff;
    border: 1px solid #e1eaf3;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(21,101,192,.07);
}

.gate-head {
    display: flex;
    align-items: center;
}

.gate-name {
    font-size: 17px;
    font-weight: bold;
    color: var(--ink);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ¿¬°á »óÅÂ ¹èÁö */
.conn {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: bold;
    border-radius: 11px;
    padding: 3px 10px 3px 8px;
    flex-shrink: 0;
}

    .conn .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        margin-right: 5px;
        flex-shrink: 0;
    }

    .conn.on {
        background: #e8f5e9;
        color: #2e7d32;
    }

        .conn.on .dot {
            background: #43a047;
        }

    .conn.off {
        background: #ffebee;
        color: #c62828;
    }

        .conn.off .dot {
            background: #e53935;
        }

.gate-state {
    font-size: 13px;
    color: var(--blue-2);
    background: #f0f7ff;
    border-radius: 8px;
    padding: 7px 12px;
    margin: 12px 0 0;
    text-align: center;
    font-weight: bold;
}

    .gate-state.dead {
        background: #ffebee;
        color: #c62828;
    }

.gate-btns {
    display: flex;
    gap: 7px;
    margin-top: 14px;
}

.gb {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
}

    .gb:disabled {
        opacity: .45;
    }

    .gb:active {
        transform: translateY(1px);
    }

    .gb.lock {
        background: #FFA000;
    }

    .gb.up {
        background: linear-gradient(135deg, var(--sky-2), var(--blue-1));
    }

    .gb.down {
        background: #607d8b;
    }

    .gb.stat {
        background: #9575cd;
    }

.gate-msg {
    font-size: 12.5px;
    text-align: center;
    margin-top: 9px;
    min-height: 16px;
}

    .gate-msg.ok {
        color: #2e7d32;
    }

    .gate-msg.ng {
        color: #c62828;
    }

    .gate-msg.wait {
        color: #90a4ae;
    }

/* ===== ÀÌ·Â ===== */
.log-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e1eaf3;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 8px;
}

.log-left {
    flex: 1;
    min-width: 0;
}

.log-time {
    font-size: 11.5px;
    color: #90a4ae;
}

.log-gate {
    font-size: 14.5px;
    font-weight: bold;
    color: var(--ink);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-right {
    text-align: right;
    flex-shrink: 0;
}

.log-act {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    border-radius: 8px;
    padding: 2px 8px;
}

    .log-act.open {
        background: var(--blue-1);
    }

    .log-act.close {
        background: #78909c;
    }

    .log-act.lock {
        background: #FFA000;
    }

    .log-act.stat {
        background: #9575cd;
    }

.log-res {
    font-size: 11px;
    font-weight: bold;
    border-radius: 8px;
    padding: 2px 7px;
    margin-left: 4px;
}

    .log-res.ok {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .log-res.ng {
        background: #ffebee;
        color: #c62828;
    }

.log-nick {
    font-size: 11.5px;
    color: #7a8fa3;
    margin-top: 4px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.pg {
    color: var(--blue-1);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border: 1px solid #cfdce8;
    border-radius: 16px;
}

    .pg:active {
        background: #e3f2fd;
    }

.pg-now {
    font-size: 14px;
    color: var(--ink);
    font-weight: bold;
}

/* ===== ÇÏ´Ü ÅÇ¹Ù ===== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 58px;
    background: #fff;
    border-top: 1px solid #e1eaf3;
    display: flex;
    box-shadow: 0 -2px 12px rgba(21,101,192,.08);
    z-index: 100;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #a4b5c4;
    font-size: 11px;
    gap: 3px;
}

    .tab svg {
        width: 21px;
        height: 21px;
        fill: currentColor;
    }

    .tab.on {
        color: var(--blue-1);
        font-weight: bold;
    }

    .tab:active {
        background: #f5faff;
    }

/* ===== »ç¿ëÀÚ È­¸é ===== */
.user-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 28px 40px;
    background: linear-gradient(165deg, var(--sky-1) 0%, var(--blue-1) 48%, var(--blue-deep) 100%);
    text-align: center;
}

.u-msg {
    font-size: 13px;
    color: rgba(255,255,255,.9);
    margin-top: 14px;
    min-height: 18px;
}

    .u-msg.ng {
        color: #ffcdd2;
    }

.u-reset {
    display: block;
    margin-top: 24px;
    color: rgba(255,255,255,.75);
    font-size: 12.5px;
    text-decoration: underline;
}

.wait-ico {
    font-size: 44px;
    margin-bottom: 14px;
}

.wait-title {
    color: #fff;
    font-size: 21px;
    font-weight: bold;
}

.wait-sub {
    display: inline-block;
    color: #fff;
    background: rgba(255,255,255,.2);
    border-radius: 12px;
    padding: 4px 14px;
    font-size: 13px;
    margin: 12px 0 18px;
}

.wait-txt {
    color: rgba(255,255,255,.85);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 30px;
}
.btn-sm.gray {
    background: #90a4ae;
    display: inline-block;
    line-height: 42px;
    text-decoration: none;
    text-align: center;
}

.btn-sm.gray:active {
    background: #78909c;
}
.who-adm {
    font-size: 10px;
    background: #e3f2fd;
    color: var(--blue-2);
    border-radius: 7px;
    padding: 1px 6px;
    margin-right: 4px;
}
