* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; }
.page { display: none; min-height:100vh; align-items:center; justify-content:center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.page.active { display:flex; }
.login-container { background:white; padding:40px 50px; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.3); width:100%; max-width:400px; }
.login-container h1 { text-align:center; margin-bottom:30px; font-size:24px; }
.form-group { margin-bottom:18px; }
.form-group label { display:block; margin-bottom:5px; font-weight:500; font-size:14px; }
.form-group input { width:100%; padding:10px 14px; border:1px solid #ddd; border-radius:6px; font-size:14px; transition:border-color .3s; }
.form-group input:focus { outline:none; border-color:#667eea; }
.btn { display:inline-block; padding:10px 24px; border:none; border-radius:6px; font-size:14px; font-weight:600; cursor:pointer; transition:all .3s; }
.btn-primary { width:100%; background:linear-gradient(135deg, #667eea 0%, #764ba2 100%); color:white; padding:12px; font-size:16px; }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(102,126,234,0.4); }
.btn-sm { padding:6px 14px; font-size:12px; }
.btn-outline { background:transparent; border:1px solid rgba(255,255,255,0.3); color:white; }
.btn-outline:hover { background:rgba(255,255,255,0.1); }
.btn-success { background:#52c41a; color:white; }
.btn-danger { background:#ff4d4f; color:white; }
.btn-warning { background:#faad14; color:white; }
.btn-info { background:#1890ff; color:white; }
.btn-success:hover { background:#45a818; }
.btn-danger:hover { background:#e04345; }
.btn-warning:hover { background:#e09c12; }
.btn-info:hover { background:#1478d9; }
.form-footer { text-align:center; margin-top:16px; font-size:14px; color:#888; }
.form-footer a { color:#667eea; text-decoration:none; cursor:pointer; }
.navbar { background:linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding:16px 40px; display:flex; justify-content:space-between; align-items:center; color:white; box-shadow:0 2px 8px rgba(0,0,0,0.1); }
.nav-brand { font-size:20px; font-weight:700; }
.nav-user { display:flex; align-items:center; gap:16px; }
.dashboard, .admin-dashboard { padding:30px 40px; max-width:1400px; margin:0 auto; }
.admin-section { background:white; border-radius:10px; padding:24px; margin-bottom:30px; box-shadow:0 2px 8px rgba(0,0,0,0.06); }
.admin-section h2 { margin-top:0; margin-bottom:16px; }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:20px; margin-bottom:30px; }
.stat-card { background:white; padding:20px 24px; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,0.06); display:flex; align-items:center; gap:16px; }
.stat-icon { font-size:32px; }
.stat-number { font-size:28px; font-weight:700; color:#333; }
.stat-label { font-size:14px; color:#888; }
.server-list h2 { margin-bottom:20px; font-size:20px; }
.server-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px,1fr)); gap:20px; }
.server-card { background:white; border-radius:10px; padding:20px 24px; box-shadow:0 2px 8px rgba(0,0,0,0.06); transition:transform .2s, box-shadow .2s; cursor:pointer; }
.server-card:hover { transform:translateY(-4px); box-shadow:0 8px 25px rgba(0,0,0,0.1); }
.server-card .server-name { font-size:18px; font-weight:600; margin-bottom:8px; }
.server-card .server-status { display:inline-block; padding:2px 12px; border-radius:12px; font-size:12px; font-weight:600; }
.server-card .server-status.running { background:#e6f7e6; color:#52c41a; }
.server-card .server-status.stopped { background:#ffeded; color:#ff4d4f; }
.server-card .server-status.pending { background:#fff7e6; color:#faad14; }
.server-card .server-ip { color:#888; font-size:13px; margin-top:6px; }
.loading { text-align:center; padding:40px; color:#888; }
table { width:100%; border-collapse:collapse; }
table th, table td { padding:10px 12px; text-align:left; border-bottom:1px solid #e8e8e8; }
table th { background:#f7f8fa; font-weight:600; }
.detail-actions { display:flex; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
#addProductForm input, #addProductForm select { padding:6px 10px; border:1px solid #ddd; border-radius:4px; }
.modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); align-items:center; justify-content:center; z-index:1000; }
.modal.active { display:flex; }
.modal-content { background:white; border-radius:12px; padding:30px 35px; width:100%; max-width:560px; max-height:90vh; overflow-y:auto; position:relative; }
.modal-close { position:absolute; top:16px; right:20px; font-size:28px; cursor:pointer; color:#aaa; }
.modal-close:hover { color:#333; }
.modal-content h2 { margin-bottom:16px; }
.modal-info { background:#f7f8fa; padding:14px 18px; border-radius:8px; margin-bottom:20px; }
.modal-info p { margin:4px 0; }
.usage-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:12px 0 20px 0; }
.usage-item { background:#f7f8fa; padding:12px 16px; border-radius:8px; }
.usage-label { font-size:13px; color:#888; display:block; margin-bottom:4px; }
.progress-bar { height:6px; background:#e8e8e8; border-radius:3px; overflow:hidden; margin:4px 0; }
.progress-fill { height:100%; border-radius:3px; background:linear-gradient(90deg, #667eea, #764ba2); transition:width .6s ease; }
.usage-value { font-size:13px; font-weight:600; }
.modal-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.modal-actions .btn { flex:1; min-width:80px; text-align:center; }
@media (max-width:768px) {
    .dashboard, .admin-dashboard { padding:16px; }
    .navbar { padding:12px 16px; flex-wrap:wrap; gap:8px; }
    .stats-grid { grid-template-columns:1fr 1fr; }
    .server-grid { grid-template-columns:1fr; }
    .usage-grid { grid-template-columns:1fr; }
    .login-container { padding:30px 24px; margin:16px; }
    .modal-content { padding:20px; margin:16px; }
    .modal-actions .btn { min-width:60px; font-size:12px; padding:8px 12px; }
}