/* ============================================================
 * 酒店云桌面 - 管理页面附加样式
 * 部署位置：public/css/management-pages.css
 * 引用方式：在 index.html 中 <link rel="stylesheet" href="css/management-pages.css">
 * ============================================================ */

/* ==================== 登录/注册页 ==================== */

.auth-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #1a237e 0%, #0d1442 50%, #1a237e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    color: #333;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card-wide {
    max-width: 560px;
    margin: 0 auto;
}

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 4px;
}

.auth-brand p {
    font-size: 13px;
    color: #888;
}

.auth-form {
    margin-bottom: 20px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #555;
}

.auth-form .form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #0d1442 0%, #1a237e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    font-size: 13px;
    color: #888;
}

.auth-footer a {
    color: #1a237e;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    border-left: 4px solid #c62828;
}

.auth-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    border-left: 4px solid #2e7d32;
}

.required {
    color: #c62828;
}

/* 注册页双列表单 */
.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .auth-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== 侧边栏用户信息 ==================== */

.user-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ff8f00 100%);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-detail {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.logout-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ==================== 用户管理表格 ==================== */

.users-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.users-table-wrapper .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.users-table-wrapper .panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* ==================== 套餐卡片 ==================== */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.plan-card {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e8eaf0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #1a237e;
}

.plan-card-featured {
    border-color: #1a237e;
    position: relative;
}

.plan-card-featured::before {
    content: '默认套餐';
    position: absolute;
    top: 12px;
    right: -32px;
    background: #ffd700;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 36px;
    transform: rotate(45deg);
    z-index: 1;
}

.plan-card-header {
    padding: 24px 24px 16px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #fff;
}

.plan-card-featured .plan-card-header {
    background: linear-gradient(135deg, #0d1442 0%, #1a237e 100%);
}

.plan-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
}

.price-unit {
    font-size: 13px;
    opacity: 0.7;
}

.plan-card-body {
    padding: 20px 24px;
    flex: 1;
}

.plan-device-limit {
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.plan-device-limit strong {
    font-size: 20px;
    color: #1a237e;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.plan-features li {
    font-size: 13px;
    color: #555;
    padding: 5px 0;
}

.plan-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

.plan-card-footer {
    padding: 14px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-hotels-count {
    font-size: 12px;
    color: #999;
}

.plan-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== 套餐使用统计 ==================== */

.plan-usage-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.plan-usage-panel .panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.plan-usage-panel .panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* ==================== 响应式 ==================== */

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}
