:root {
    --primary: #007bff;
    --bg: #f8f9fa;
    --text: #212529;
    --card-bg: #ffffff;
    --border: #dee2e6;
    --danger: #dc3545;
    --success: #28a745; /* Green for tasks */
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    margin: 0; padding: 0; background: var(--bg); color: var(--text); line-height: 1.5;
}

.top-nav {
    background: #fff; padding: 15px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}
.top-nav h1 { margin: 0; font-size: 1.25rem; color: var(--primary); }
.nav-links-group { display: flex; gap: 15px; align-items: center; }
.nav-link { text-decoration: none; color: var(--primary); font-weight: 600; font-size: 0.9rem; }

.container { padding: 15px; max-width: 600px; margin: 0 auto; }
.card { background: var(--card-bg); padding: 20px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 15px; }

/* Action Bar & Expanding Search */
.action-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    gap: 10px; 
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f0f2f5; 
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 44px;
    width: 44px;
}

.search-wrapper.active {
    flex-grow: 1; 
    background: white;
    border-color: var(--primary);
}

.search-trigger {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #4b4f56;
    z-index: 2;
}

.search-wrapper.active .search-trigger {
    color: var(--primary);
}

.search-input {
    width: 0;
    padding: 0;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    background: transparent;
    font-size: 1rem;
    opacity: 0;
}

.search-wrapper.active .search-input {
    width: 100%;
    padding-right: 10px;
    opacity: 1;
}

/* Search Results Dropdown */
.search-dropdown {
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: white;
    border: 1px solid var(--border); 
    border-radius: 8px; 
    z-index: 1000; /* Ensure it stays above other cards */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    display: none; 
    width: 100%;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
}

.search-item {
    display: block; padding: 12px 15px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid #f0f2f5; font-size: 0.95rem;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #f8f9fa; }

.text-green { color: var(--success); font-weight: bold; }
.text-blue { color: var(--primary); font-weight: bold; }

.btn { 
    padding: 12px 15px; border-radius: 8px; border: none; font-weight: 600; 
    cursor: pointer; text-decoration: none; display: inline-block; font-size: 1rem; text-align: center;
}
.btn-start { background: var(--primary); color: white; height: 44px; display: flex; align-items: center; }
.btn-build { background: #f0f2f5; color: #4b4f56; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.btn-delete-trash { background: #f0f2f5; color: var(--danger); border: 1px solid var(--border); padding: 12px 15px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; }

.stack-row { padding: 15px 0; border-bottom: 1px solid var(--border); }
.stack-info { margin-bottom: 12px; font-size: 1.1rem; }
.stack-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.management-group { display: flex; gap: 8px; }
.start-form { display: flex; gap: 5px; flex-grow: 1; }
.start-select { padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; width: 100%; }