* { 
    box-sizing: border-box;
    padding: 0; 
    margin: 0; 
}

a { 
    text-decoration: none; 
    color: #000; 
}


html,
body { 
	width: 100%; 
    min-height: 100%; 
}

body { 
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 30px);
    text-align: center;

    background: linear-gradient(to left, #f857a6, #ff5858);
    font-family: sans-serif; 
}

h1 {
    margin-bottom: 20px;
    font-size: clamp(24px, 6vw, 30px);
}

.wrap { 
    width: min(100%, 500px);
    min-height: min(650px, calc(100vh - 32px));
    padding: clamp(24px, 6vw, 50px);
    background-color: #fff;
    border-radius: 8px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.form {
    width: 100%;
}

.form_btn {
    transition: .2s;
}

.form_btn:hover {
    opacity: .9;
}

.wrap .form input:not([type='submit']),
.wrap .form select:focus{
    width: 100%;
    min-height: 52px;
    margin: 5px 0;
    padding-left: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 5px;
    font-size: 18px;
}

.wrap .form input:not([type='submit']):focus,
.wrap .form select:focus {
    outline: none;
    border-color: #f857a6;
    box-shadow: 0 0 0 3px rgba(248,87,166,.15);
}

.wrap .form_btn{
    width: 100%;
    min-height: 52px;
    margin: 10px 0;
    border-radius: 5px;
    border: 0;
    background: linear-gradient(to left, #f857a6, #ff5858);
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
}

div#alert-danger{
    color :red;
}

#form_wrap .forgetpw a,
#form_wrap .regist_btn a {
    color: red;
}

#form_wrap .forgetpw {
    text-align: left;
    font-size: 14px;
    margin: 0 0 10px 0;
    cursor: pointer;
}

.regist_btn{
    margin-top: 10px;
}



.content-page {
    width: 100%;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 40px 20px;
    box-sizing: border-box;

    
}

.content-page .wrap {
    width: 100%;
    min-width: 810px;
    max-width: 900px;

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);

    padding: 30px;
    box-sizing: border-box;
}

.content-page .form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.content-page input,
.content-page select,
.content-page textarea {
    width: 100%;
    padding: 10px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    font-size: 15px;
    box-sizing: border-box;
}

.content-page .form_btn {
    margin-top: 15px;

    padding: 12px;

    border: none;
    border-radius: 6px;

    background: #0078d4;
    color: #fff;

    font-size: 16px;
    cursor: pointer;
}

.content-page .form_btn:hover {
    background: #0063b1;
}

.content-page .form-line {
    display: grid;
    grid-template-columns: 120px 285px 120px 285px;
    column-gap: 10px;
    align-items: center;
}

.content-page .form-line label {
    width: 120px;
    font-weight: 600;
    text-align: right;
    font-weight: 600;
    padding-right: 10px;
}

.content-page .form-line input,
.content-page .form-line select {
    width: 285px;
    height: 52px;
    
    font-family: inherit;
    box-sizing: border-box;
}

.form-line-full {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: center;
    
}

.form-line-full label {
    text-align: right;
    padding-right: 10px;
    font-weight: 600;
}

.form-line-full input {
    width: 100%;
    box-sizing: border-box;
}

.license-list {
    margin-top: 28px;
}

.license-list h3 {
    margin-bottom: 12px;
}

.license-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.license-list th,
.license-list td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.license-list th {
    background: #f3f3f3;
    font-weight: 700;
}

.license-list td:nth-child(2) {
    text-align: left;
    font-family: Consolas, monospace;
}

.device-toggle {
    border: none;
    background: transparent;
    color: #0066cc;
    font-weight: 700;
    cursor: pointer;
}

.device-toggle:hover {
    text-decoration: underline;
}

.device-row td {
    background: #fafafa;
}

.device-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.device-table th,
.device-table td {
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 13px;
}

.device-table th {
    background: #eee;
}

.device-empty {
    padding: 10px;
    color: #777;
}

.content-page .wrap {
    display: flex;
    flex-direction: column;
}

.content-page .form {
    width: 100%;
}

.content-page .license-list {
    width: 100%;
    margin-top: 28px;
}

.content-page .form_btn {
    width: 100%;
    box-sizing: border-box;
}

.extend-form {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.extend-form input[type="date"] {
    width: 135px;
    height: 34px;
    padding: 4px 6px;
    font-size: 13px;
}

.extend-form button {
    height: 34px;
    padding: 0 10px;
    border: none;
    border-radius: 4px;
    background: #0078d4;
    color: #fff;
    cursor: pointer;
}

.extend-form button:hover {
    background: #0063b1;
}

.database-row{
    display:grid;
    grid-template-columns:120px 1fr;
    gap:10px;
}

.database-row label{
    align-self:start;
    padding-top:17px;
    font-weight:600;
}

.database-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.database-item{
    display:grid;
    grid-template-columns:3fr 2fr 38px 38px;
    gap:8px;
    align-items:center;
}

.db-btn {
    width: 36px;
    height: 36px;

    border: none;
    border-radius: 6px;

    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;

    transition: .2s;
}

.db-add {
    background: #28a745;
}

.db-add:hover {
    background: #218838;
}

.db-remove {
    background: #dc3545;
}

.db-remove:hover {
    background: #c82333;
}

.license-key-box{
    margin-bottom:16px;
}

.license-key-box label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
    text-align:left;
}

.license-key-line{
    display:flex;
    gap:8px;
    align-items:center;
}

.license-key-line input{
    flex:1;
    font-family:Consolas, monospace;
}

.copy-btn{
    width:70px;
    height:40px;
    border:none;
    border-radius:6px;
    background:#0078d4;
    color:#fff;
    cursor:pointer;
}

.copy-btn:hover{
    background:#0063b1;
}



/* ==========================================================
   Account Management
   ========================================================== */

.account-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.account-header h3 {
    margin: 0;
}

.account-add-toggle {
    min-width: 130px;
    height: 44px;
    padding: 0 18px;

    border: none;
    border-radius: 6px;

    background: #0078d4;
    color: #fff;

    font-size: 15px;
    font-weight: 700;
    cursor: pointer;

    transition: .2s;
}

.account-add-toggle:hover {
    background: #0063b1;
}

/* ==========================================================
   Account Create
   ========================================================== */

.account-create-box {
    width: 100%;

    margin-bottom: 20px;
    padding: 22px 20px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fafafa;
}

.account-create-form {
    width: 100%;
}

.account-form-grid {
    display: grid;
    grid-template-columns: 110px 1fr 110px 1fr;
    gap: 12px 16px;
    align-items: center;
}

.account-form-grid label {
    text-align: right;
    padding-right: 8px;
    font-weight: 700;
}

.account-form-grid input,
.account-form-grid select {
    width: 100%;
    height: 46px;

    padding: 8px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    font-family: inherit;
    font-size: 15px;
}

.account-form-actions {
    display: flex;
    justify-content: center;
    gap: 10px;

    margin-top: 22px;
}

.account-save-btn,
.account-cancel-btn {
    width: 130px;
    height: 42px;

    border: none;
    border-radius: 6px;

    color: #fff;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: .2s;
}

.account-save-btn {
    background: #0078d4;
}

.account-save-btn:hover {
    background: #0063b1;
}

.account-cancel-btn {
    background: #777;
}

.account-cancel-btn:hover {
    background: #555;
}

/* ==========================================================
   Inline Form
   ========================================================== */

.inline-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin: 0;
}

.inline-form button {
    height: 34px;
    padding: 0 12px;

    border: none;
    border-radius: 4px;

    background: #0078d4;
    color: #fff;

    cursor: pointer;

    transition: .2s;
}

.inline-form button:hover {
    background: #0063b1;
}

.inline-form select {
    height: 34px;
    padding: 0 10px;
}

/* 패스워드 초기화 버튼 가운데 */
.password-reset-cell {
    text-align: center;
}

/* ==========================================================
   Detail
   ========================================================== */

.account-detail-line {
    display: flex;
    align-items: center;
    gap: 40px;

    padding: 12px 18px;

    background: #fafafa;
}

.account-detail-line > span {
    display: flex;
    align-items: center;
}

.account-detail-line strong {
    margin-right: 6px;
    white-space: nowrap;
}

.account-detail-line .inline-form {
    margin-left: 6px;
}

.account-detail-line select {
    width: 140px;
}

.muted-text {
    margin-left: 10px;

    color: #777;
    font-size: 13px;
}

.password-reset-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.password-reset-wrap .inline-form {
    margin: 0;
}

.form-error,
.form-success{
    transition: opacity .4s ease;
}

.message-hide{
    opacity:0;
}





.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.show {
    display: flex;
}

.modal-box {
    width: 360px;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-box input {
    width: 100%;
    margin-bottom: 10px;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.modal-box input:not([type='submit']):focus{
    outline: none;
    border-color: #f857a6;
    box-shadow: 0 0 0 3px rgba(248,87,166,.15);
}

.modal-actions {
    display: flex;
    justify-content:  space-between;
    gap: 10px;
    margin-top: 10px;
}

.modal-actions .form_btn {
    width: 110px;
    min-width: 110px;
    height: 42px;
    border-radius: 8px;
    font-weight: 600;
    transition: all .2s;
}

.modal-actions .btn-save {
    background: #2d8cff;
    color: #fff;
    border: none;
}

.modal-actions .btn-save:hover {
    background: #1976e6;
    cursor: pointer;
}

.modal-actions .btn-cancel {
    background: #f5f5f5;
    color: #444;
    border: 1px solid #ccc;
}

.modal-actions .btn-cancel:hover {
    background: #e8e8e8;
    cursor: pointer;
}

.modal-message {
    min-height: 20px;
    font-size: 13px;
    color: #d93025;
}

.form_btn.secondary {
    background: #777;
}



/* PASS KEY 전용 */
.passkey-page {
    width:100%;
    height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;
}


.passkey-page .wrap {
    width: 450px !important;
    height: 300px !important;

    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);

    padding: 20px;
    box-sizing: border-box;

    display: block;
}

@media (max-width: 768px) {
    .passkey-page .wrap {
        width: calc(100% - 20px) !important;
        height: 400px !important;
    }
}

.passkey-page #passkey-title {
    margin:0 0 10px;

    text-align:center;

    font-size:24px;
    line-height:1;
    margin-bottom: 30px;
}


.passkey-page .pass-table {
    width:100%;
    border-collapse:collapse;
}


.passkey-page .pass-table th,
.passkey-page .pass-table td {
    padding:2px 5px;
}

/* 테이블 */
.passkey-page .pass-table {
    width:100%;
    border-collapse:collapse;
}


.passkey-page .pass-table th {
    width:60px;
    text-align:left;
    color: #333;
}


.passkey-page .pass-table td {
    text-align: left;
    padding:5px;
}


.passkey-page .pass-table .passkey {
    text-align:center;
    vertical-align:middle;

    padding-left:20px;
    font-weight:bold;
    font-size: 32px;
    color:#1976e6;
}
