/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fa;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

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

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    font-size: 40px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
}

.login-header p {
    color: #888;
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.error-message {
    color: #ef4444;
    margin-bottom: 16px;
    padding: 10px;
    background: #fef2f2;
    border-radius: 6px;
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #667eea;
    color: #667eea;
}

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

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

.btn-block {
    width: 100%;
}

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

.btn-icon {
    padding: 8px;
}

/* 主页面布局 */
.main-page {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 顶部导航栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.sidebar-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: #666;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
}

.top-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-header .logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background: #f3f4f6;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.search-box .material-icons {
    position: absolute;
    left: 10px;
    color: #999;
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

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

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

.user-icon {
    font-size: 24px;
    color: #667eea;
}

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

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: #1f2937;
    color: white;
    padding-top: 60px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: transform 0.3s;
}

.sidebar-nav {
    padding: 16px;
}

.nav-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 8px;
    padding-left: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: #374151;
    color: white;
}

.nav-item.active {
    background: #667eea;
    color: white;
}

.nav-item .material-icons {
    font-size: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #374151;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
    gap: 8px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 240px;
    margin-top: 60px;
    padding: 24px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 24px;
    color: #1f2937;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.online {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.offline {
    background: #fef2f2;
    color: #ef4444;
}

.status-badge.running {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.idle {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.resolved {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.status-badge.released {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.deprecated {
    background: #f3f4f6;
    color: #6b7280;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.online-icon {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon.offline-icon {
    background: #fef2f2;
    color: #ef4444;
}

.stat-icon.warning-icon {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon.success-icon {
    background: #dbeafe;
    color: #2563eb;
}

.stat-info .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.stat-info .stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* 图表区域 */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card.large {
    grid-column: span 2;
}

.chart-header {
    margin-bottom: 16px;
}

.chart-header h3 {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

/* 地图容器 */
.map-container {
    height: 300px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.map-grid {
    position: relative;
    width: 100%;
    height: 100%;
}

.map-marker {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.map-marker:hover {
    transform: scale(1.2);
}

.marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.marker-dot.online {
    background: #22c55e;
}

.marker-dot.offline {
    background: #ef4444;
}

.marker-dot.warning {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.marker-label {
    font-size: 11px;
    color: #374151;
    margin-top: 4px;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-legend {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 16px;
    background: white;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.online {
    background: #22c55e;
}

.legend-dot.offline {
    background: #ef4444;
}

.legend-dot.warning {
    background: #f59e0b;
}

/* 告警区域 */
.alert-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.section-header h3 {
    font-size: 16px;
    color: #1f2937;
}

.view-all {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
}

.view-all:hover {
    text-decoration: underline;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
}

.alert-item.warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.alert-item.error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.alert-item.info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.alert-icon {
    font-size: 20px;
}

.alert-content .alert-title {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.alert-content .alert-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* 表单元素 */
.form-select, .form-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: #667eea;
}

.form-select.small {
    padding: 6px 10px;
    font-size: 12px;
}

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

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

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

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

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

.data-table tr:last-child td {
    border-bottom: none;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 16px;
}

.page-info {
    color: #6b7280;
    font-size: 13px;
}

/* 历史轨迹页面 */
.history-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.history-map {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 300px;
}

.history-map .map-grid {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 8px;
    position: relative;
}

.route-line {
    width: 100%;
    height: 100%;
}

.history-controls {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    margin-bottom: 16px;
}

.progress-bar-container input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

.progress-time {
    display: block;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    margin-top: 8px;
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.history-info {
    grid-column: span 2;
}

/* 告警统计 */
.alert-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.alert-stat-item {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-num {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-num.error {
    color: #ef4444;
}

.stat-num.warning {
    color: #f59e0b;
}

.stat-num.info {
    color: #3b82f6;
}

.stat-num.success {
    color: #22c55e;
}

.stat-text {
    color: #6b7280;
    font-size: 13px;
}

.level-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.level-badge.error {
    background: #fee2e2;
    color: #dc2626;
}

.level-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.level-badge.info {
    background: #dbeafe;
    color: #2563eb;
}

/* 报表页面 */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

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

.report-header h3 {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 12px;
}

.report-value {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
}

.report-value .unit {
    font-size: 16px;
    color: #6b7280;
    font-weight: 400;
    margin-left: 4px;
}

.report-trend {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.report-trend.up {
    color: #22c55e;
}

.report-trend.down {
    color: #ef4444;
}

/* 设备卡片 */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.device-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.device-card.online {
    border-left-color: #22c55e;
}

.device-card.offline {
    border-left-color: #ef4444;
}

.device-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.device-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.device-status.online {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.device-status.offline {
    background: #ef4444;
}

.device-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.device-info {
    margin-bottom: 16px;
}

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

.device-info .label {
    color: #9ca3af;
    margin-right: 8px;
}

.battery {
    font-weight: 600;
}

.battery.high {
    color: #22c55e;
}

.battery.medium {
    color: #f59e0b;
}

.battery.low {
    color: #ef4444;
}

.device-actions {
    display: flex;
    gap: 8px;
}

/* 角色徽章 */
.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.role-badge.admin {
    background: #fef2f2;
    color: #dc2626;
}

.role-badge.operator {
    background: #dbeafe;
    color: #2563eb;
}

.role-badge.viewer {
    background: #fef3c7;
    color: #d97706;
}

/* OTA页面 */
.section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

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

.upgrade-tasks {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upgrade-task {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
}

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

.task-name {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.task-status.in-progress {
    background: #dbeafe;
    color: #2563eb;
}

.task-progress {
    margin-bottom: 12px;
}

.task-progress .progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.task-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 13px;
    color: #6b7280;
}

.task-info {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.task-info span {
    font-size: 13px;
    color: #6b7280;
}

.task-actions {
    display: flex;
    gap: 8px;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.modal-sm {
    max-width: 400px;
}

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

.modal-header h3 {
    font-size: 18px;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
}

.modal-close:hover {
    color: #6b7280;
}

.modal-form .form-group {
    margin-bottom: 16px;
}

.modal-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.modal-form input, .modal-form select, .modal-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Toast消息 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #22c55e;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .charts-grid .chart-card.large {
        grid-column: span 1;
    }

    .history-container {
        grid-template-columns: 1fr;
    }

    .history-info {
        grid-column: span 1;
    }

    .alert-stats {
        flex-wrap: wrap;
    }

    .alert-stat-item {
        flex: 1;
        min-width: 140px;
    }
}

/* ================================================================ */
/* 指令测试页面样式 */
/* ================================================================ */

.cmdtest-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cmdtest-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cmdtest-section h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.device-selector {
    display: flex;
    gap: 24px;
    align-items: flex-end;
}

.device-selector .input-group {
    flex: 1;
    max-width: 300px;
}

.device-selector label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.device-selector input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.cmd-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.cmd-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.cmd-btn:hover {
    border-color: #667eea;
    background: #eff6ff;
}

.cmd-btn.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.cmd-btn .material-icons {
    font-size: 32px;
}

.cmd-btn span:last-child {
    font-size: 13px;
    font-weight: 500;
}

.custom-cmd {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
}

.custom-cmd label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-lg .material-icons {
    font-size: 20px;
    margin-right: 8px;
}

.result-container {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.result-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
    padding: 16px;
}

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

.tab-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.history-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.history-item:last-child {
    border-bottom: none;
}

.history-main {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 8px;
}

.history-cmd {
    font-weight: 600;
    color: #374151;
}

.history-sn {
    color: #6b7280;
    font-size: 13px;
}

.history-time {
    color: #9ca3af;
    font-size: 12px;
    margin-left: auto;
}

.history-detail {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.status-badge.success {
    background: #dcfce7;
    color: #166534;
}

.status-badge.warning {
    background: #fef9c3;
    color: #854d0e;
}

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