@charset "UTF-8";

/* ==========================================================
   1. Common
   ========================================================== */

/* -----------------------------
   CSS Variables
------------------------------ */
:root {
    --primary-color: #0b4bdf;
    --secondary-color: #1b1f3b;
    --text-main: #333333;
    --text-light: #777777;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
}

/* -----------------------------
   Base
------------------------------ */
body {
    background-color: var(--bg-light);
    font-family: 'Pretendard', 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-main);
}

/* -----------------------------
   Reset
------------------------------ */
* {
    box-sizing: border-box;
}


/* ==========================================================
   2. Layout
   ========================================================== */

/* -----------------------------
   Header
------------------------------ */
.license-header {
    background: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.license-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.license-logo img {
    height: 30px;
}

.license-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.license-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.license-menu a:hover,
.license-menu a.active {
    color: #fff;
}


/* -----------------------------
   User Dropdown
------------------------------ */
.license-user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.user-icon-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.user-icon-btn:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.user-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.user-dropdown.active {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.header-user-name {
    display: inline-block;
    margin-right: 12px;
    color: #cccccc;
    font-size: 14px;
    font-weight: 700;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* -----------------------------
   Sub Visual
------------------------------ */
.sub-visual {
    background: var(--secondary-color);
    color: white;
    padding: 60px 20px 0 20px;
    text-align: center;
    position: relative;
    background-image:
            linear-gradient(to bottom, #1b1f3b 0%, #1c2e6b 100%),
            url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect x="10" y="50" width="20" height="50" fill="%23ffffff22"/><rect x="40" y="30" width="25" height="70" fill="%23ffffff11"/><rect x="75" y="60" width="15" height="40" fill="%23ffffff22"/></svg>');
    background-size: cover, 200px 200px;
    background-position: center, bottom center;
    background-repeat: no-repeat, repeat-x;
}

.sub-visual h1 {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    word-break: keep-all;
    white-space: nowrap;
}

.sub-visual-tabs {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.sub-visual-tabs a {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 15px 40px;
    font-size: 16px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.sub-visual-tabs a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.sub-visual-tabs a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-bottom: 3px solid #ff4757;
    font-weight: 600;
}


/* -----------------------------
   Container
------------------------------ */
.license-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    min-height: 500px;
}


/* -----------------------------
   Footer
------------------------------ */
.license-footer {
    background: #111;
    color: #888;
    padding: 40px 20px;
    margin-top: 60px;
}

.license-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 14px;
}

.license-footer-links a {
    color: #ccc;
    text-decoration: none;
    margin-right: 20px;
}

/* ==========================================================
   3. Common Components
   ========================================================== */

/* -----------------------------
   Form
------------------------------ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon .toggle-pw {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
}

.flex-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-timer {
    display: inline-block;
    min-width: 46px;
    margin-left: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
}

.btn-outline.disabled,
.btn-primary.disabled,
button:disabled {
    background: #eeeeee !important;
    color: #999999 !important;
    border-color: #dddddd !important;
    cursor: not-allowed !important;
}

/* -----------------------------
   Button
------------------------------ */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #093bba;
}

.btn-outline {
    padding: 10px 15px;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-outline:hover {
    background: var(--bg-light);
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
    width: auto !important;
    min-width: 70px;
}

.btn-md {
    padding: 10px 20px !important;
    font-size: 14px !important;
    width: auto !important;
    min-width: 120px;
}

.btn-lg {
    padding: 14px 30px !important;
    font-size: 16px !important;
}


/* -----------------------------
   Checkbox
------------------------------ */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.checkbox-group input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}


/* -----------------------------
   Terms
------------------------------ */
.terms-box {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-light);
    height: 100px;
    overflow-y: auto;
}


/* -----------------------------
   Tab
------------------------------ */
.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-headers button {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tab-headers button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==========================================================
   5. Modal
   ========================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
    padding-right: 10px;
}


/* ==========================================================
   6. Responsive
   ========================================================== */
@media (max-width: 768px) {

    /* Header & Navigation */
    .license-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .license-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .license-user-actions {
        position: absolute;
        top: 15px;
        right: 20px;
    }

    /* Sub Visual */
    .sub-visual {
        padding: 40px 15px 0 15px;
    }

    .sub-visual h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .sub-visual-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .sub-visual-tabs a {
        padding: 10px 20px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* Container & Forms */
    .license-container {
        padding: 20px 15px;
        margin: 20px auto;
    }

    .account-container {
        padding: 25px 15px;
    }

    .flex-row {
        flex-direction: column;
        align-items: stretch;
    }

    .flex-row .btn-outline {
        width: 100%;
        margin-top: 5px;
    }

    /* Tables with Horizontal Scroll */
    .admin-table,
    .mypage-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Admin Search Bar */
    .admin-search-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .admin-search-bar .form-group {
        width: 100%;
        min-width: 100%;
    }

    .admin-search-bar > div[style*="align-items: flex-end"] {
        flex-direction: row;
        align-items: stretch !important;
    }

    .admin-search-bar .btn-primary,
    .admin-search-bar .btn-outline {
        flex: 1;
        width: 100%;
        padding: 12px;
    }

    /* Purchase Multi-step */
    .step-indicator {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .step-content > div[style*="display: flex; gap: 40px;"] {
        flex-direction: column;
        gap: 20px !important;
    }
}
