/* ==================== EPLAN 授权管理 - 样式 ==================== */

:root {
    --primary-orange: #FF6B35;
    --primary-orange-dark: #E55A2B;
    --primary-orange-light: #FFF0E8;
}

body {
    background-color: #F8F9FA;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
}

/* ==================== 导航栏 ==================== */
.navbar-custom {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}
.navbar-custom .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
}
.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}
.navbar-custom .nav-link:hover {
    color: #fff;
}

/* ==================== 按钮 ==================== */
.btn-orange {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
    font-weight: 500;
    border-radius: 8px;
    padding: 2px 16px;
    transition: all 0.2s;
}
.btn-orange:hover {
    background-color: var(--primary-orange-dark);
    border-color: var(--primary-orange-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* ==================== 所有按钮统一悬停效果 ==================== */
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-outline-orange:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-orange {
    color: var(--primary-orange);
    border-color: var(--primary-orange);
    border-radius: 8px;
    font-weight: 500;
}
.btn-outline-orange:hover {
    background-color: var(--primary-orange);
    color: #fff;
}

/* ==================== 卡片 ==================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ==================== 表格 ==================== */
.table-custom {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.table-custom thead {
    background-color: var(--primary-orange-light);
}
.table-custom thead th {
    color: var(--primary-orange-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-orange);
    padding: 14px;
}
.table-custom tbody td {
    padding: 14px;
    vertical-align: middle;
    border-bottom: 1px solid #F0F0F0;
}
.table-custom tbody tr:hover {
    background-color: var(--primary-orange-light);
}

/* ==================== 徽章 ==================== */
.badge-permanent {
    background-color: #28A745;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}
.badge-trial {
    background-color: #FFC107;
    color: #333;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}
.badge-active {
    background-color: #D4EDDA;
    color: #155724;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}
.badge-revoked {
    background-color: #DC3545;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ==================== 表单 ==================== */
.form-control-custom {
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    padding: 2px 6px;
    transition: all 0.2s;
}
.form-control-custom:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

/* ==================== 登录页 ==================== */
.login-card {
    max-width: 420px;
    margin: 80px auto;
    padding: 40px;
}
.login-title {
    color: var(--primary-orange);
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

/* ==================== 滑动验证 ==================== */
.slider-captcha {
    position: relative;
    width: 100%;
    height: 48px;
    background: #F0F0F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    transition: border-color 0.3s;
}
.slider-captcha.success {
    border-color: #28A745;
}
.slider-captcha.fail {
    border-color: #DC3545;
}
.slider-captcha-track {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #FFE0D0 0%, #FFD0B8 100%);
    transition: width 0.1s;
}
.slider-captcha.success .slider-captcha-track {
    background: linear-gradient(90deg, #D4EDDA 0%, #C3E6CB 100%);
}
.slider-captcha-thumb {
    position: absolute;
    left: 4px;
    top: 3px;
    width: 42px;
    height: 42px;
    background: #FFFFFF;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-orange);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 3;
    transition: all 0.1s;
}
.slider-captcha.success .slider-captcha-thumb {
    background: #28A745;
    color: #fff;
    border-color: #28A745;
}
.slider-captcha.fail .slider-captcha-thumb {
    background: #DC3545;
    color: #fff;
    border-color: #DC3545;
}
.slider-captcha-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s;
}

/* ==================== 登录页 ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.login-title {
    color: var(--primary-orange);
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}
.login-card .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}
.login-card .form-control-custom {
    width: 100%;
    height: 46px;
}
.login-card .btn-orange {
    height: 46px;
    font-size: 1rem;
    font-weight: 600;
}
/* 滑动验证：固定宽度，居中 */
.slider-captcha {
    position: relative;
    width: 100%;
    height: 48px;
    background: #F0F0F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    transition: border-color 0.3s;
}

/* ==================== 授权码卡片 ==================== */
.license-card {
    border: 1px solid #E8E8E8;
    border-left: 2px solid var(--primary-orange);
    border-radius: 6px;
    transition: all 0.15s;
    cursor: pointer;
    background: #fff;
}
.license-card:hover {
    border-left-color: var(--primary-orange-dark);
    background: #FFF8F4;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
}
.license-card strong {
    color: #333;
}
.license-card .badge-permanent,
.license-card .badge-trial,
.license-card .badge-active,
.license-card .badge-revoked {
    font-size: 0.75rem;
    padding: 3px 8px;
    margin-left: 4px;
}

/* ==================== 小徽章 ==================== */
.badge-small {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    margin-right: 4px;
}
.badge-count {
    background-color: #E8E8E8;
    color: #555;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== 三个小标签 ==================== */
.tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    font-weight: 500;
    line-height: 1.4;
}
.tag-permanent {
    background-color: #28A745;
    color: #fff;
}
.tag-trial {
    background-color: #FFC107;
    color: #333;
}
.tag-active {
    background-color: #D4EDDA;
    color: #155724;
}
.tag-revoked {
    background-color: #DC3545;
    color: #fff;
}
.tag-count {
    background-color: #E8E8E8;
    color: #555;
}

/* ==================== 试用转永久标记 ==================== */
.badge-upgraded {
    background-color: #FF6B35;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 6px;
}
.tag-upgraded {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    font-weight: 500;
    line-height: 1.4;
    background-color: #FF6B35;
    color: #fff;
}

.badge-expired {
    background-color: #6C757D;  /* 灰色，比禁用红、生效绿都更"中性" */
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ==================== 已过期徽章 ==================== */
.badge-expired {
    background-color: #6C757D;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ==================== 即将到期徽章 ==================== */
.badge-warning {
    background-color: #FFC107;
    color: #333;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ==================== 列表里的小标签：已过期 ==================== */
.tag-expired {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    font-weight: 500;
    line-height: 1.4;
    background-color: #6C757D;
    color: #fff;
}

/* ==================== 列表里的小标签：即将到期 ==================== */
.tag-warning {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    font-weight: 500;
    line-height: 1.4;
    background-color: #FFC107;
    color: #333;
}