/**
 * 基础样式 - 重置、登录、布局、侧边栏、导航、按钮、表格、表单、状态标签、提示
 */

/* 域名跳转管理系统 - 样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #0ea5e9 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-title {
    text-align: center;
    color: white;
    font-size: 24px;
    margin-bottom: 40px;
    font-weight: 500;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0d9488;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    cursor: pointer;
}

.forgot-link {
    color: #0d9488;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #0f766e;
}

/* 主应用 */
.main-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.header {
    background: #1f2937;
    color: white;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 18px;
    color: #0d9488;
    font-weight: 500;
}

.page-title {
    font-size: 14px;
    color: #9ca3af;
}

.header-right {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

.user-info:hover {
    background: rgba(255,255,255,0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #9ca3af;
}

.user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 150px;
    margin-top: 8px;
    overflow: hidden;
}

.user-menu.show {
    display: block;
}

.user-menu a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.user-menu a:hover {
    background: #f3f4f6;
}

/* 主内容 */
.main-content {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background: #1f2937;
    padding: 20px 0;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-item.active {
    background: rgba(13, 148, 136, 0.2);
    color: #0d9488;
    border-left: 3px solid #0d9488;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 子菜单样式 */
.nav-group {
    position: relative;
}

.has-submenu {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s;
}

.has-submenu.expanded .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.show {
    display: block;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 52px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.submenu-item.active {
    color: #0d9488;
    background: rgba(13, 148, 136, 0.1);
}

/* 内容区域 */
.content {
    flex: 1;
    margin-left: 200px;
    padding: 30px;
    background: #f9fafb;
    min-height: calc(100vh - 60px);
}

.page {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard */
.quote {
    text-align: center;
    color: #f97316;
    font-size: 14px;
    margin-bottom: 30px;
    font-style: italic;
}

.welcome {
    margin-bottom: 30px;
}

.welcome h2 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 8px;
}

.current-time {
    color: #0d9488;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.stat-header {
    margin-bottom: 12px;
}

.stat-title {
    font-size: 14px;
    color: #6b7280;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #0d9488;
}

.stat-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
    opacity: 0.5;
}

.system-info {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.system-info h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #1f2937;
}

.system-info p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

/* 工具栏 */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* 按钮 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #0d9488;
    color: white;
}

.btn-primary:hover {
    background: #0f766e;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-default {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-default:hover {
    background: #e5e7eb;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-edit {
    background: #0d9488;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
}

.btn-delete {
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
}

/* 搜索 */
.search-input {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #0d9488;
}

.search-select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

/* 表格 */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 14px;
}

.page-info,
.total-info {
    color: #6b7280;
}

/* 表单 */
.domain-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 800px;
}

.domain-form h2 {
    margin-bottom: 24px;
    font-size: 18px;
    color: #1f2937;
}

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

.form-label {
    display: block;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #0d9488;
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: #0d9488;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: #0d9488;
}

/* 个人设置 */
.profile-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 600px;
}

.avatar-upload {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.3s;
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .nav-text {
        display: none;
    }
    
    .content {
        margin-left: 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

