/* Project Manager — main stylesheet */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; }

/* Navbar */
.navbar { background: #2c3e50; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.navbar a { color: #ecf0f1; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.navbar .nav-links a { margin-left: 1.5rem; font-weight: 400; font-size: 0.9rem; }
.navbar .nav-links a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1000px; margin: 2rem auto; padding: 0 1rem; }
body.page-dashboard .container { max-width: none; margin: 1.5rem 2rem; }
h1 { margin-bottom: 1.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 1.2rem; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 0.9rem; color: #fff; vertical-align: middle; }
.btn svg { flex-shrink: 0; vertical-align: middle; }
.btn-primary { background: #3498db; }
.btn-success { background: #27ae60; }
.btn-danger { background: #e74c3c; }
.btn-warning { background: #e67e22; color: #fff; }
.btn-secondary { background: #7f8c8d; }
.btn-info { background: #17a2b8; }
.btn-dark { background: #343a40; }
.btn:hover { opacity: 0.85; }
.btn-sm { width: 32px; height: 32px; padding: 0; font-size: 0; gap: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-disabled { opacity: 0.25; pointer-events: none; background: #6c757d; border-color: #6c757d; color: #fff; cursor: default; }

/* Cards */
.card { background: #fff; border-radius: 8px; padding: 1.5rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card-wide { max-width: none; }

/* Status badges */
.status { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; color: #fff; }
.status-running { background: #27ae60; }
.status-pending { background: #f39c12; }
.status-deploying { background: #3498db; }
.status-stopped { background: #95a5a6; }
.status-error { background: #e74c3c; }
.status-no_service { background: #7f8c8d; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.form-group input,
.form-group textarea,
.form-group select { width: 100%; padding: 0.5rem 0.7rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.95rem; transition: border-color 0.2s; }
.form-group input:focus,
.form-group textarea:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 2px rgba(52,152,219,0.15); }
.form-group.has-error input,
.form-group.has-error textarea { border-color: #e74c3c; }
.form-group .help-text { display: block; margin-top: 0.25rem; color: #777; font-size: 0.82rem; }
.form-group .error-text { display: block; margin-top: 0.25rem; color: #e74c3c; font-size: 0.82rem; }
.form-group .required { color: #e74c3c; }
.form-group .checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; cursor: pointer; margin-top: 1.8rem; }
.form-group .checkbox-label input { width: auto; }
.form-row { display: grid; gap: 1rem; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.section-title { font-size: 0.95rem; font-weight: 700; color: #2c3e50; margin: 1.5rem 0 0.8rem; padding-bottom: 0.3rem; border-bottom: 2px solid #3498db; }
.section-title:first-child { margin-top: 0; }
.form-errors { background: #f8d7da; color: #721c24; padding: 0.7rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.form-actions { display: flex; gap: 0.7rem; margin-top: 1.5rem; }
body.page-create .container { max-width: none; margin: 1.5rem 2rem; }

/* Messages */
.messages { margin-bottom: 1rem; }
.messages li { list-style: none; padding: 0.7rem 1rem; border-radius: 4px; margin-bottom: 0.5rem; }
.messages .success { background: #d4edda; color: #155724; }
.messages .error { background: #f8d7da; color: #721c24; }

/* Code blocks */
pre { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 6px; overflow-x: auto; font-size: 0.85rem; max-height: 400px; overflow-y: auto; }

/* Actions */
.actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.actions-inline { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.actions-inline form { margin: 0; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: #fff; border-radius: 8px; padding: 2rem; min-width: 340px; max-width: 480px; box-shadow: 0 8px 30px rgba(0,0,0,0.25); text-align: center; }
.modal-box-wide { max-width: 800px; width: 90%; text-align: left; }
.modal-box p { margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.4; }
.modal-actions { display: flex; gap: 0.7rem; justify-content: center; }

/* Mini progress bar */
.progress-bar-mini { background: #e0e0e0; border-radius: 4px; overflow: hidden; height: 8px; }
.progress-bar-fill { background: #3498db; height: 100%; width: 0%; transition: width 0.5s ease; }
.progress-pct { display: inline-block; margin-left: 6px; font-size: 0.75rem; color: #555; font-weight: 600; vertical-align: middle; }
.progress-step-text { display: block; font-size: 0.7rem; color: #888; margin-top: 1px; }

/* Terminal */
#terminal-container { height: calc(100vh - 120px); padding: 4px; background: #1a1b26; border-radius: 8px; }
