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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #2ecc71;
}

.btn-primary:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Auth Form */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Dashboard */
.dashboard .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.projects-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
}

.projects-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.projects-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.projects-table tbody tr:hover {
    background-color: #f8f9fa;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-active,
.status-running {
    background-color: #d4edda;
    color: #155724;
}

.status-stopped,
.status-created {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

/* Project Detail */
.project-detail,
.layer-detail,
.create-project {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.project-detail .header,
.layer-detail .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

.project-info,
.layer-info {
    margin-bottom: 2rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.info-table {
    width: 100%;
}

.info-table td {
    padding: 0.5rem 0;
}

.info-table td:first-child {
    font-weight: 600;
    width: 150px;
}

/* Layer Tree */
.layer-tree {
    margin-top: 1rem;
}

.layer-node {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.layer-node.depth-1 {
    margin-left: 2rem;
}

.layer-node.depth-2 {
    margin-left: 4rem;
}

.layer-node.depth-3 {
    margin-left: 6rem;
}

.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.layer-info h4 {
    margin-bottom: 0.5rem;
}

.layer-meta {
    margin-top: 0.5rem;
}

.layer-actions {
    display: flex;
    gap: 0.5rem;
}

.ssh-command {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #2c3e50;
    color: white;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssh-command code {
    font-family: 'Courier New', monospace;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: #999;
}

/* Layer Path */
.layer-path {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.path-node {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.path-node span:first-child {
    padding: 0.5rem 1rem;
    background: #e9ecef;
    border-radius: 4px;
}

.arrow {
    color: #999;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}
